Skip to content

Commit

Permalink
instead of always returning true lets at least check for a sensible '…
Browse files Browse the repository at this point in the history
…bid:' at the start of string. allows exists(x, 'bids-uri) + exists(x, 'dataset') == 1 style tests to pass for non bids-uris
  • Loading branch information
rwblair committed Apr 19, 2024
1 parent dc61d0f commit 1e2262e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bids-validator/src/schema/expressionLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ function exists(list: string[], rule: string = 'dataset'): number {
list = [list]
}
if (rule == 'bids-uri') {
// XXX To implement
return list.length
return list.filter((x) => {
// XXX To implement
if (x.startsWith('bids:')) {
return true
}
return false
}).length
} else {
// dataset, subject and stimuli
return list.filter((x) => {
Expand Down

0 comments on commit 1e2262e

Please sign in to comment.