-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Migrate to span_clippy_lint
#7797
Labels
C-tracking-issue
Category: Tracking Issue
performance-project
For issues and PRs related to the Clippy Performance Project
Comments
4 tasks
xFrednet
added
the
performance-project
For issues and PRs related to the Clippy Performance Project
label
Jul 20, 2024
I took a small stab at this and refactored 40 restriction lints in #13136. Check list
@rustbot claim |
This was referenced Jul 22, 2024
bors
added a commit
that referenced
this issue
Jul 26, 2024
Make restriction lint's use `span_lint_and_then` (i -> p) This migrates a few restriction lints to use `span_lint_and_then`. This change is motivated by #7797. I've also cleaned up some lint message. Mostly minor stuff. For example: suggestions with a longer message than `"try"` now use `SuggestionStyle::ShowAlways` --- cc: #7797 brother PR of: #13136 changelog: none
bors
added a commit
that referenced
this issue
Aug 5, 2024
Make restriction lint's use `span_lint_and_then` (a -> e) This migrates a few restriction lints to use `span_lint_and_then`. This change is motivated by #7797. I'm also interested if it will have an impact on performance. With some of these lints, like [`clippy::implicit_return`](https://rust-lang.github.io/rust-clippy/master/index.html#/implicit_return) I expect an impact, as it was previously creating a suggestion **for every implicit return** which is just wild. I've also cleaned up some lint message. Mostly minor stuff. For example: suggestions with a longer message than `"try"` now use `SuggestionStyle::ShowAlways` --- `@blyxyas` Could you benchmark this PR? I want to get all the numbers :3 --- This also crashed our new lintcheck CI with the following message: > Error: $GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of 1024k, got 46731k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary Which is just wild. Like, I've [tested the first 20 lints](https://github.com/xFrednet/rust-clippy/actions/runs/10027528172) and got like four changes and then this. 50 MB of changed lint messages o.O. Looks like I'll create a separate PR to fix that step ^^ --- cc: #7797 changelog: none r? `@blyxyas`
bors
added a commit
that referenced
this issue
Aug 6, 2024
Make restriction lint's use `span_lint_and_then` (q -> w) This migrates a few restriction lints to use `span_lint_and_then`. This change is motivated by #7797. I've also cleaned up some lint message. Mostly minor stuff. For example: suggestions with a longer message than `"try"` now use `SuggestionStyle::ShowAlways` --- cc: #7797 sister PR of: #13136 changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-tracking-issue
Category: Tracking Issue
performance-project
For issues and PRs related to the Clippy Performance Project
We have a handful of utils for emitting lints:
span_lint
,span_lint_and_help
, etc. We'd like to replace these with one new util namedspan_clippy_lint
. It was already implemented in #7668, but not yet merged.Goals
Question: Should we use
.emit()
like rustc, or useDrop
to emit automatically?Steps
span_clippy_lint
from Enable trimmed paths #7668 and patch the metadata collector to work with itspan_lint_*
calls tospan_clippy_lint
span_lint*
utils and metadata collector supportThe text was updated successfully, but these errors were encountered: