Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config wildcard ignores: ignored #133

Open
bpinsard opened this issue Dec 20, 2024 · 3 comments
Open

config wildcard ignores: ignored #133

bpinsard opened this issue Dec 20, 2024 · 3 comments

Comments

@bpinsard
Copy link
Contributor

I am trying to ignore a set of errors when running the validator on a datalad without any file fetched.

Here is the config I wrote following https://github.com/bids-standard/bids-validator/blob/main/docs/user_guide/command-line.md#configuration-file

{
  "ignore": [
    {"code": "TSV_COLUMN_MISSING", "location": "/**/*_scans.tsv"},
    {"code": "TSV_ADDITIONAL_COLUMNS_UNDEFINED", "location": "/**/*_scans.tsv"},
    {"code": "SCANS_FILENAME_NOT_MATCH_DATASET"}
  ]
}

But the errors keep showing up (except the last ignore SCANS_FILENAME_NOT_MATCH_DATASET ).
I tried different type of globbing patterns, but none seems to work.
Are wildcard patterns supported? If so in which format?
Thanks!

@effigies
Copy link
Contributor

effigies commented Dec 20, 2024

No, the matches are literals. We hadn't really considered the possibility of globs.

@bpinsard
Copy link
Contributor Author

From my limited understanding of the code, it seems that the config ignores are merged with .bidsignore which can contains globs similar to a .gitignore, so that wouldn't work through that either? IIRC the legacy validator is able to handle globs in .bidsignore.
How complex would that be to implement globs?
Thanks!

@effigies
Copy link
Contributor

Globs are supported in .bidsignore. The config takes partial issues and recategorizes any issue found that matches them into the appropriate bucket. It's a completely different mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants