Commit graph

114 commits

Author SHA1 Message Date
Alex Macleod
6de27a0272 lintcheck: key lints on line start rather than byte start/end 2024-08-10 19:08:30 +00:00
Alex Macleod
17de8fbd06 lintcheck: disable doc links 2024-08-08 00:39:30 +00:00
bors
9d9a0dcb64 Auto merge of #13225 - Jarcho:warnings, r=flip1995
Use `-D warnings` instead of `deny-warnings` feature.

r? `@flip1995`
changelog: none
2024-08-06 14:58:50 +00:00
Jason Newcomb
4e57b2c46f Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
bors
a411267453 Auto merge of #13210 - Alexendoo:lintcheck-force-warn, r=xFrednet
lintcheck: force warn all lints

It occurred to me that like `--filter` we could use `--force-warn` for normal operations, we especially want to see lints that crates decided were too annoying or were false positives

Also excludes `clippy::cargo` from the default set as nobody is really writing those and it slows things down

r? `@xFrednet`

changelog: none
2024-08-06 09:46:08 +00:00
sheshnath-at-knoldus
b9716dd32a fix-typos 2024-08-03 23:18:29 +05:30
Alex Macleod
d18ce7cea0 lintcheck: force warn all lints 2024-08-03 12:28:52 +00:00
bors
be8234098b Auto merge of #13139 - xFrednet:lintcheck-limit-summery-output, r=Alexendoo
Lintcheck: Rework and limit diff output for GH's CI

### Background

While working on https://github.com/rust-lang/rust-clippy/pull/13136 I found an amazing limitation of GH's CI. The summary can at most have be 1MB of text. Here is the warning message:

> $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

[The PR](https://github.com/rust-lang/rust-clippy/pull/13136) produced a *casual* 61808 changes. Guess that's why those lints are not *warn-by-default* :P.

### Changes:

This PR limits the lintcheck diff output in two ways.

1. The diff is limited to 200 messages per lint per section. Hidden messages are indicated by a message at the end of the section.
2. The output is first written to a file and only the first 1MB is written to ` >> $GITHUB_STEP_SUMMARY`. The entire file is also written to the normal CI log. This helps for cases where several lints change and the total size exceeds the 1MB limit.

An example of these changes can be seen here: https://github.com/xFrednet/rust-clippy/actions/runs/10028799118?pr=4

---

changelog: none

r? `@Alexendoo`

Sorry for bombarding you with so many PR's lately 😅 Feel free to pass some of you reviews to me.
2024-07-25 12:11:35 +00:00
xFrednet
bdf3e585a3
Lintcheck: Review comments <3 2024-07-24 22:45:41 +02:00
xFrednet
04693a4eca
Lintcheck: Support underscores replacement in URL crate names 2024-07-23 09:46:59 +02:00
xFrednet
23b231a5d6
Lintcheck: Fix Errors, because of course 2024-07-22 18:19:37 +02:00
xFrednet
1f879fc0cf
Lintcheck: Minor cleanup and function moves 2024-07-22 18:02:39 +02:00
xFrednet
4fea5199e4
Lintcheck: Order summary by lint and truncate messages 2024-07-22 17:59:26 +02:00
bors
7f0ed11213 Auto merge of #13133 - xFrednet:lintcheck-linkify-summary, r=Alexendoo
Lintcheck: Cleanup of Lintcheck's CI summery

This PR makes three changes to lintcheck's job summary:
* Adds links to the *Added*, *Removed*, *Changed* sections
* Added the crate name to the warning info
* Removes empty lines from the rendered output

This is what the new output roughly looks like:

![image](https://github.com/user-attachments/assets/3faae0a6-e5ee-4e70-9d4d-d19b18dc6a3a)
![image](https://github.com/user-attachments/assets/028c3a92-98dc-4e00-b7bb-fecf9450f5b1)

[🖼️ Old Output 🖼️](https://github.com/xFrednet/rust-clippy/actions/runs/10019681444)

[🖼️ New Output 🖼️](https://github.com/xFrednet/rust-clippy/actions/runs/10019598141)

The links for the sections are a bit weird as you have to click on them twice. I believe this is a bug from GH's side. But it works reasonably well :D

---

changelog: none

r? `@Alexendoo`
2024-07-21 12:37:00 +00:00
xFrednet
69c3289f2b
Lintcheck: Include the crate name in the CI job summary 2024-07-20 13:25:44 +02:00
xFrednet
83c8385ad1
Lintcheck: Remove empty lines from rendered CI output 2024-07-20 13:25:44 +02:00
xFrednet
09906b8221
Lintcheck: Linkify counts in CI summery 2024-07-20 13:13:13 +02:00
Bruce Mitchener
cf4270d13b Reduce typo count. 2024-07-20 12:50:36 +07:00
xFrednet
8940bc3c46
Lintcheck: New testset for Clippy's CI (200 crates for ~10 min) 2024-07-19 19:52:07 +02:00
xFrednet
4ece12da32
Lintcheck: Update the default testset for local lintcheck 2024-07-19 19:52:03 +02:00
xFrednet
46ebe0cb68
Lintcheck: Normalize thread IDs in shared_target_dir 2024-07-19 19:51:41 +02:00
xFrednet
9d82fb460a
Lintcheck: More info on Diags without spans 2024-07-18 16:41:06 +02:00
xFrednet
31fdc2ec09
Lintcheck: Remove rust-toolchain from downloaded crates 2024-07-18 16:41:05 +02:00
xFrednet
0e3d19799c
Lintcheck: Construct links for sources 2024-07-18 15:28:14 +02:00
xFrednet
601a61fe27
Lintcheck: Refactor CrateSource 2024-07-10 00:34:24 +02:00
xFrednet
c3a240608b
Lintcheck: Refactor structs and only take one version per crate 2024-07-09 22:00:58 +02:00
Alex Macleod
eac1aab1ff Reduce the size of lintcheck JSON output 2024-07-07 21:05:51 +00:00
xFrednet
93e74a4187
Lintcheck: Update lintcheck documentation 2024-07-07 18:42:09 +02:00
xFrednet
25bb612538
Lintcheck: Add --warn-all and make it the CI default 2024-07-05 16:42:20 +02:00
klensy
606ada193f bump strip-ansi-escapes 2024-06-24 18:06:02 +03:00
Alex Macleod
2194304b05 Cache lintcheck binary in ci 2024-06-23 17:05:46 +00:00
Alex Macleod
3a983c399a Merge lintcheck popular-crates bin as a subcommand 2024-06-16 18:28:00 +00:00
Alex Macleod
477b0c6a78 lintcheck: Add JSON output, diff subcommand 2024-06-15 13:58:10 +00:00
Renato Lochetti
9173c58e68
Using Clippy as a proper noun when refering to the unique entity Clippy 2024-06-03 20:46:05 +01:00
Philipp Krones
c200dad300
Merge remote-tracking branch 'upstream/master' into rustup 2024-05-16 14:20:56 -07:00
Markus Reiter
d32629891a Use generic NonZero. 2024-05-08 21:37:55 +02:00
Philipp Krones
537ab6cc87
Bump clap version -> 4.4
Same version as most other crates in rustc are using
2024-05-03 11:36:42 +02:00
Philipp Krones
a5aaf33422 Merge commit 'ca3b393750ee8d870bf3215dcf6509cafa5c0445' into clippy-subtree-update 2024-04-18 17:48:52 +02:00
bors
eecff6d07b Auto merge of #12439 - Jacherr:issue-12185, r=blyxyas
fix ice reporting in lintcheck

Fixes https://github.com/rust-lang/rust-clippy/issues/12185

This PR fixes the lack of reported ICEs within lintcheck by modifying the way in which data is collected from each crate being linted.

Instead of lintcheck only reading `stdout` for warnings, it now also reads `stderr` for any potential ICE (although admittedly, it is not the cleanest method of doing so). If it is detected, it parses the ICE into its message and backtrace separately, and then adds them to the list of outputs via clippy.

Once all outputs are collected, the formatter then proceeds to generate the file as normal.

Note that this PR also has a couple of side effects:
- When clippy fails to process a package, but said failure is not an ICE, the `stderr` will be sent to the console;
- Instead of `ClippyWarning` being the primary struct for everything reported, there is now `ClippyCheckOutput`, an enum which splits the outputs into warnings and ICEs.

changelog: none
2024-04-05 18:16:07 +00:00
Jacherr
42d09703b4 Add support for ICE reporting in lintcheck 2024-04-05 20:14:38 +02:00
Philipp Krones
0ae4a048c6 Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
Alex Macleod
a24d12b7aa Enable unused_qualifications lint 2024-03-22 15:58:29 +00:00
Philipp Krones
7be6e2178e Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into clippy-subtree-update 2024-02-27 15:50:17 +01:00
Guillaume Gomez
5e2707d343 Fix new lint warnings 2024-02-24 15:02:10 +01:00
Philipp Krones
3596d44988 Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyup 2023-12-16 14:12:50 +01:00
Jubilee Young
9083b52122 Check $CARGO before $PATH 2023-12-09 14:08:03 -08:00
Philipp Krones
c9a43b18f1 Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-sync 2023-12-01 18:21:58 +01:00
y21
3e83a521e4 replace Vec with slice in lintcheck 2023-11-15 15:17:38 +01:00
Philipp Krones
77c1e3aaa1 Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup 2023-11-02 17:35:56 +01:00
y21
d6fc606259 [map_identity]: recognize tuples 2023-10-21 15:40:34 +02:00