Skip to content

Commit 082508e

Browse files
committed
fix: Missing parameter, unnecessary optional parameter
1 parent 4e4cc60 commit 082508e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/validators/internal/unusedFile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { GenericSchema } from '../../types/schema.ts'
22
import type { BIDSFile, FileTree } from '../../types/filetree.ts'
33
import type { BIDSContextDataset } from '../../schema/context.ts'
44

5-
function* walkFileTree(fileTree?: FileTree, dsContext: BIDSContextDataset): Generator<BIDSFile> {
5+
function* walkFileTree(fileTree: FileTree, dsContext: BIDSContextDataset): Generator<BIDSFile> {
66

77
if (!fileTree) {
88
return
@@ -26,7 +26,7 @@ export async function unusedStimulus(
2626
dsContext: BIDSContextDataset,
2727
) {
2828
const stimDir = dsContext.tree.get('stimuli') as FileTree
29-
const unusedStimuli = [...walkFileTree(stimDir)].filter((stimulus) => !stimulus.viewed)
29+
const unusedStimuli = [...walkFileTree(stimDir, dsContext)].filter((stimulus) => !stimulus.viewed)
3030
if (unusedStimuli.length) {
3131
dsContext.issues.add({ code: 'UNUSED_STIMULUS', affects: unusedStimuli.map((s) => s.path) })
3232
}

0 commit comments

Comments
 (0)