File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import type { BIDSFile, FileTree } from '../../types/filetree.ts'
33import type { BIDSContextDataset } from '../../schema/context.ts'
44
55function * walkFileTree ( fileTree : FileTree , dsContext : BIDSContextDataset ) : Generator < BIDSFile > {
6-
76 if ( ! fileTree ) {
87 return
98 }
@@ -26,7 +25,9 @@ export async function unusedStimulus(
2625 dsContext : BIDSContextDataset ,
2726) {
2827 const stimDir = dsContext . tree . get ( 'stimuli' ) as FileTree
29- const unusedStimuli = [ ...walkFileTree ( stimDir , dsContext ) ] . filter ( ( stimulus ) => ! stimulus . viewed )
28+ const unusedStimuli = [ ...walkFileTree ( stimDir , dsContext ) ] . filter ( ( stimulus ) =>
29+ ! stimulus . viewed
30+ )
3031 if ( unusedStimuli . length ) {
3132 dsContext . issues . add ( { code : 'UNUSED_STIMULUS' , affects : unusedStimuli . map ( ( s ) => s . path ) } )
3233 }
@@ -40,7 +41,7 @@ export async function sidecarWithoutDatafile(
4041) {
4142 const unusedSidecars = [ ...walkFileTree ( dsContext . tree , dsContext ) ] . filter (
4243 ( file ) => ( ! file . viewed && file . name . endsWith ( '.json' ) &&
43- ! standalone_json . includes ( file . name ) ) ,
44+ ! standalone_json . includes ( file . name ) ) ,
4445 )
4546 unusedSidecars . forEach ( ( sidecar ) => {
4647 dsContext . issues . add ( { code : 'SIDECAR_WITHOUT_DATAFILE' , location : sidecar . path } )
You can’t perform that action at this time.
0 commit comments