Skip to content

Commit

Permalink
schema: add check for duplicate READMEs (#1952)
Browse files Browse the repository at this point in the history
* schema: add check for duplicate READMEs

* Update src/schema/rules/checks/general.yaml

* Update src/schema/rules/checks/general.yaml

---------

Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
sappelhoff and effigies authored Oct 11, 2024
1 parent f2771e1 commit d9c23eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/schema/rules/checks/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@ ReadmeFileSmall:
- match(path, '^/README')
checks:
- size > 150

DuplicateReadmes:
issue:
code: MULTIPLE_README_FILES
message: |
There are multiple '/README' files (with different extensions) in this BIDS
dataset. Only one '/README' file should exist.
level: error
selectors:
- match(path, '^/README.*')
checks:
- exists(["README", "README.md", "README.rst", "README.txt"], "dataset") == 1

0 comments on commit d9c23eb

Please sign in to comment.