Add --cap-lints option
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
> rustc --help
...
--cap-lints LEVEL
Set the most restrictive lint level. More restrictive
lints are capped at this level
...
I believe that this option allows the compilation of crates while ignoring some errors, for backward compatibility. More information about the option can be found in the RFC introducing it.
I think the paragraph that resumes the behavior of the option the best is the following:
For example when
--cap-lints allowis passed, all instances of#[warn],#[deny], and#[forbid]are ignored. If, however--cap-lints warnis passed onlydenyandforbiddirectives are ignored.
The acceptable values for LEVEL will beallow,warn,deny, orforbid.
Using something like -frust-cap-lints=LEVEL would also probably make sense and be easy to use. I think this also relies a bit on macros being implemented in order to handle different level of lints directly in the source using the aforementioned directives
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the RFC introducing cap-lints, linked in the issue, and compare its semantics with the reported rustc --help text. Trace how gccrs handles compiler options and lint levels; the work is done when allow, warn, deny, and forbid are accepted and the documented capping behavior is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100