diff --git a/src/common-principles.md b/src/common-principles.md index 4e5509ac7b..454ecb2bad 100644 --- a/src/common-principles.md +++ b/src/common-principles.md @@ -202,6 +202,11 @@ as the labels would collide on a case-insensitive filesystem. Additionally, because the suffix `eeg` is defined, then the suffix `EEG` will not be added to future versions of the standard. +### Dotfiles + +Files and directories starting with a dot (`.`) are reserved for system use and no valid recognized BIDS file or directory can start with a `.`. +Any file or directory starting with a `.` present in a BIDS dataset is considered hidden and not subject to BIDS validation. + ## Uniqueness of data files Data files MUST be uniquely identified by BIDS path components diff --git a/tools/schemacode/src/bidsschematools/__main__.py b/tools/schemacode/src/bidsschematools/__main__.py index 777bea2d87..5f86cacad4 100644 --- a/tools/schemacode/src/bidsschematools/__main__.py +++ b/tools/schemacode/src/bidsschematools/__main__.py @@ -169,7 +169,9 @@ def pre_receive_hook(schema, input_, output): logger.debug("Validating files, first file: %s", filename) any_files = True filename = filename.strip() - if any(_bidsignore_check(pattern, filename, "") for pattern in ignore): + if filename.startswith(".") or any( + _bidsignore_check(pattern, filename, "") for pattern in ignore + ): continue if not any(re.match(regex, filename) for regex in regexes): print(filename, file=output)