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

Add Support for warn and deny Lint Configuration #622

Open
InsertCreativityHere opened this issue Jun 28, 2023 · 0 comments
Open

Add Support for warn and deny Lint Configuration #622

InsertCreativityHere opened this issue Jun 28, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@InsertCreativityHere
Copy link
Member

Currently we support 'allowing' lints (which downgrades them to a diagnostic level of Allowed).
This can be done with either the [allow(X)] attribute or the --allow X command line option.

To be feature complete we should also add support for warn and deny attributes/CLI options.

Like allow, these would only work for lints (not errors):
Marking a lint as warn will cause the compiler to emit warnings for the lint.
Marking a lint as deny will cause the compiler to emit errors for the lint.

Note that unlike 'true errors', just because a lint is marked with deny, it will not cause compilation to terminate early.
These lint configuration attributes only affect the compiler's exit code, and the message we emit for the lint.
It has no other affect on compilation.


An open question is what do we use for the short-command-line-options?
-a == --allow, -w == --warn, -d == --deny?
or
-A == --allow, -W == --warn, -D == --deny?

Rust users upper-case for these, but we're already using -D for --define.

An alternative is instead of using deny we could name it error, giving us --error and -E which are free options.

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

1 participant