diff --git a/src/schema/rules/checks/general.yaml b/src/schema/rules/checks/general.yaml index 3c03bac91d..653a3a8cff 100644 --- a/src/schema/rules/checks/general.yaml +++ b/src/schema/rules/checks/general.yaml @@ -20,6 +20,18 @@ ReadmeFileSmall: Please consider expanding it with additional information about the dataset. level: warning selectors: - - match(path, '^/README') + - match(path, '^/README.*') checks: - size > 150 + +DuplicateReadmes: + issues: + 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