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

Document how lints are actually emitted #1168

Open
rylev opened this issue Jul 4, 2021 · 2 comments
Open

Document how lints are actually emitted #1168

rylev opened this issue Jul 4, 2021 · 2 comments
Labels
A-lints Area: lints C-enhancement Category: enhancement E-hard Difficulty: might require advanced knowledge E-needs-investigation Call for participation: this issue needs further investigation T-compiler Relevant to compiler team

Comments

@rylev
Copy link
Member

rylev commented Jul 4, 2021

The section on linting describes how to declare a lint and how lint passes are constructed, but we are still missing an explanation on how the lint system takes buffered lints and decides whether to actually emit them to users. For instance, how does --cap-lints work?

@jieyouxu jieyouxu added E-hard Difficulty: might require advanced knowledge A-lints Area: lints T-compiler Relevant to compiler team labels Nov 2, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Nov 2, 2024

Jotting down some notes for involved concepts:

  • Lint passes (EarlyLintPass vs LateLintPass)
  • Lint groups
  • Lint levels
  • In-source annotations versus cli flags
  • Lint level precedence (e.g. multiple annotations on the same node, scoping)
  • CLI -A/W/D/F <lint_name> flags
  • --cap-lints
  • --force-warn
  • warnings special speudo lint group
  • Lints tied to editions
  • Builtin lints
  • Pre-expansion lints (deprecated but still a thing)
  • Lint buffers (e.g. in rustc_resolve)
  • Diagnostics infra's interaction with lints (mapping from lint levels to diag levels, emitters)

@jieyouxu jieyouxu added C-enhancement Category: enhancement E-needs-investigation Call for participation: this issue needs further investigation labels Nov 2, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Nov 2, 2024

(BTW this is very underspecified and underdocumented, see #113307 where I found out rust-lang/rust#113307 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: lints C-enhancement Category: enhancement E-hard Difficulty: might require advanced knowledge E-needs-investigation Call for participation: this issue needs further investigation T-compiler Relevant to compiler team
Projects
None yet
Development

No branches or pull requests

2 participants