-
Notifications
You must be signed in to change notification settings - Fork 1.6k
lintcheck: Add JSON output, diff subcommand #9764
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
Conversation
r? @giraffate (rust-highfive has picked a reviewer for you, use r? to override) |
r? @matthiaskrgr (whoops, forgot to do that) Here's an example output for the diff of running 35 added, 0 removed, 136 changed Added
Changed-warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
+warning: the following explicit lifetimes could be elided: 'a
--> bstr-0.2.17/src/ext_slice.rs:70:1
|
70 | pub fn B<'a, B: ?Sized + AsRef<[u8]>>(bytes: &'a B) -> &'a [u8] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::needless_lifetimes)]` on by default
-warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
+warning: the following explicit lifetimes could be elided: 'r
--> regex-1.4.3/src/re_bytes.rs:1168:5
|
1168 | fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+help: replace with `'_` in generic arguments such as here
+ --> regex-1.4.3/src/re_bytes.rs:1168:53
+ |
+1168 | fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> {
+ | ^^
[ trimmed ] |
☔ The latest upstream changes (presumably #9945) made this pull request unmergeable. Please resolve the merge conflicts. |
cea4044
to
1b6e7cc
Compare
☔ The latest upstream changes (presumably #10356) made this pull request unmergeable. Please resolve the merge conflicts. |
Superseded by #10398 |
Run a diff of lintcheck against the merge base for pull requests changelog: none <!-- changelog_checked --> This is an MVP of sorts, it consists of #9764 + a GitHub action that feeds the output to the [job summary](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary). It doesn't yet do anything fancy like `--recursive` or adding comments to the PR, so you'd have to click through to the action to see the results Example output of a change (Alexendoo@0be1ab8): https://github.com/Alexendoo/rust-clippy/actions/runs/4264858870#summary-11583333018 r? `@flip1995`
This adds a JSON output to lintcheck,
cargo lintcheck --json ...
will create a JSON file that is the serialisation of theVec<ClippyWarning>
resultscargo lintcheck diff a.json b.json
can then be used to show the difference between two runsMoves the path rewriting to
--remap-path-prefix
in order to have it reflected in the rendered diagnosticschangelog: none