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

deno: lost --config option? #1937

Open
yarikoptic opened this issue Apr 18, 2024 · 3 comments
Open

deno: lost --config option? #1937

yarikoptic opened this issue Apr 18, 2024 · 3 comments
Labels

Comments

@yarikoptic
Copy link
Contributor

Trying to run bids-examples tests but they use https://github.com/bids-standard/bids-examples/blob/master/bidsconfig.json file via -c option to ignore 99 error.

Is -c coming to deno version of validator?

@nellh
Copy link
Member

nellh commented Apr 18, 2024

It's not implemented but partly because the format here is different (issues no longer have a number assigned) and partly because it can be done by passing in alternative schemas. Maybe we should allow a way to exclude a path in the schema as a simpler way to disable a check?

@yarikoptic
Copy link
Contributor Author

Maybe we should allow a way to exclude a path in the schema as a simpler way to disable a check?

  • is such a path reported in the validator output and "specific-enough" to identify the issue to skip (or to change level e.g. from WARNING to ERROR etc)
  • I do not think all errors would have path in the schema since some checks might still be "code driven" right?

@effigies
Copy link
Collaborator

effigies commented Jun 9, 2024

Every issue should have a code, such as REQUIRED_FIELD_MISSING (I don't think that's real). There's a many-to-one mapping from schema rules (e.g., rules.files.raw.func.BOLD) to issue codes. So it seems like a reasonable config would be something like:

ignore:
  - CODE1  # Any rule that triggers this issue
  - CODE2
  - CODE3:  # Just some rules
    - rule1
    - rule2
warn:
  - CODE4
error:
  - CODE5:
    - rule3
    - rule4

I would also be inclined to command-line arguments:

--ignore CODE1 CODE2 CODE3:rule1 CODE3:rule2 \
--warn CODE4 \
--error CODE5:rule3 CODE5:rule4

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

No branches or pull requests

3 participants