Skip to content

Commit 174a35a

Browse files
committed
Add rule to ensure that "project" DatasetType has no subject folders
Idea from @effigies while discussing this PR at BIDS Maintainers meeting 2025
1 parent 2898cac commit 174a35a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/schema/rules/checks/dataset.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ SubjectFolders:
1414
checks:
1515
- length(dataset.subjects.sub_dirs) > 0
1616

17+
NoSubjectFolders:
18+
issue:
19+
code: NOSUBJECT_FOLDERS
20+
message: |
21+
There must be no subject directories (labeled "sub-*") in the root of the "project" type BIDS dataset.
22+
level: error
23+
selectors:
24+
- path == '/dataset_description.json'
25+
- dataset.dataset_description.DatasetType == "project"
26+
checks:
27+
- length(dataset.subjects.sub_dirs) == 0
28+
1729
# 49
1830
ParticipantIDMismatch:
1931
issue:

0 commit comments

Comments
 (0)