Commit Graph

85 Commits

Author SHA1 Message Date
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
Philipp Krones
d6d530fd0b Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup 2023-07-17 10:22:32 +02:00
Alex Macleod
2811effe34 Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
Philipp Krones
cb3ecf7b79 Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup 2023-07-02 14:59:02 +02:00
Jason Newcomb
949712c90a Reborrow mutable references in explicit_iter_loop 2023-06-09 21:40:03 -04:00
Philipp Krones
e6dc0efc00 Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup 2023-06-02 11:41:57 +02:00
beetrees
6f13a37499
Add spans to clippy.toml error messages 2023-06-02 00:56:27 +01:00
Philipp Krones
7e9abb311d Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
bors
a7335cbf90 Auto merge of #10712 - blyxyas:fix-fixflag_implies_all_targets, r=llogiq
Document that `cargo clippy --fix` implies `--all-targets`

In [`cargo fix`'s documentation](https://doc.rust-lang.org/cargo/commands/cargo-fix.html) they indicate that `fix` implies `--all-targets` if no target is supplied. As Clippy uses Cargo under the hood, this also applies to Clippy, but we didn't document that behaviour.

This PR changes that

Fixes #10690
changelog: Add to documentation that `--fix` implies `--all-targets`
2023-04-25 17:11:52 +00:00
blyxyas
4a76b6f04f
Add the warning to all documentation. 2023-04-25 02:05:32 +02:00
Josh Soref
d2061faf9e Spelling
* applying
* binding
* complex
* constituent
* demonstrate
* desugaring
* exact
* expression
* for
* functionalities
* github
* implementation
* infers
* multiple conflicting traits
* mutable
* necessarily
* nightly
* nonexistent
* optional
* parameter
* reassignments
* resources
* substitution
* suggestion
* that
* that array is
* using the

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-23 10:52:27 -04:00
Philipp Krones
6b95029f17 Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup 2023-04-11 15:31:08 +02:00
Yuri Astrakhan
41b367fa5f Gramar, and spelin kleanup
A few minor cleanups in various markdown files, mostly focusing on spelling and ignoring non-compilable codeblocks.
2023-03-30 15:31:14 -04:00
Philipp Krones
cf8a67d9ad Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup 2023-03-10 10:53:50 +01:00
bors
a45f71265c Auto merge of #10458 - samueltardieu:multithreading-lintcheck, r=llogiq
lintcheck: use multithreading unless --fix or --recursive is used

Use multithreading unless there is a reason not to.

changelog: none
2023-03-09 17:01:20 +00:00
Samuel Tardieu
a701af45cb lintcheck: use multithreading unless --fix or --recursive is used 2023-03-08 22:29:57 +01:00
Samuel "Sam" Tardieu
ce3415e87b Add the popular-crates binary
This program downloads crates info from https://crates.io/ and builds
a TOML file that can be fed to `lintcheck`.
2023-03-08 09:43:28 +01:00
Samuel Tardieu
79829d8718 lintcheck: use clap's derive interface
This makes the code shorter and clearer.

The only incompatible change is that an explicit command-line argument
`--crates-toml=` will take precedence over the `LINTCHECK_TOML`
environment variable.
2023-03-04 23:17:27 +01:00
Samuel Tardieu
446ae429a6 lintcheck: fix parallel processing handling
Using `rayon::current_num_threads()` causes a bug:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
  ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }',
  src/main.rs:632:10
```

Moreover, using the number of threads and dividing it by 2 wouldn't
return the number of physical threads on modern processors which have
a varying number of threads per core.

It makes little sense to restrict ourselves to physical threads,
especially when, in modern architectures, cores with multiple threads
are often faster (performance) while cores with a unique threads are
often slower (efficient). The Rust runtime will make a better choice.
2023-03-04 17:29:58 +01:00
Jason Newcomb
0413fb35ba Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyup 2023-02-25 19:28:50 -05:00
Jirka Vebr
0b1ae20365
Fix dogfood tests by adding type annotations 2023-02-16 13:29:38 +01:00
Samuel Tardieu
aeaa1cc342 lintcheck: fix clap panic 2023-02-12 14:54:14 +01:00
Philipp Krones
e7fe1f9c14 Merge commit '0f7558148c22e53cd4608773b56cdfa50dcdeac3' into clippyup 2023-02-10 14:01:19 +01:00
KaDiWa
ef2596155d
update some dependencies 2023-01-31 23:31:12 +01:00
Philipp Krones
d05e2865a0 Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup 2022-12-01 18:29:38 +01:00
kraktus
2fd10bc59b dogfood with expanded uninlined_format_args 2022-11-25 16:49:05 +01:00
Philipp Krones
46c5a5d234 Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup 2022-11-21 20:51:52 +01:00
Alex Macleod
bd8369089c Track clippy.toml and Cargo.toml in file_depinfo
Causes cargo to re-run clippy when those paths are modified

Also tracks the path to `clippy-driver` in debug mode to remove the
workarounds in `cargo dev lint` and `lintcheck`
2022-10-25 11:32:49 +00:00
Alex Macleod
ff893366c1 Mark let_underscore_drop as uplifted 2022-10-23 14:06:51 +00:00
flip1995
cd0bb7de01 Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup 2022-10-23 15:18:45 +02:00