Use rayon to figure out the threadcount and half that for core count.
For each core, create a target dir that is used.
Otherwise, when running multiple clippys with the same target-dir, cargo would lock the dir and prevent parallelism.
This way we can run multiple clippys at the same time (on root crates) but we sacrifice cache-hits (when we already cargo-checked crate-deps).
Fix for issue 6640
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: unnecessary_wraps will now suggest to remove unnecessary wrapped return unit type, like Option<()>
fixes#6640
Fix lintcheck by excluding checked crates from workspace
r? `@matthiaskrgr` cc `@camsteffen`
So `exclude` doesn't work with glob patterns, but it turns out that it works with `starts_with`.
changelog: none
Lintcheck and an options for command line options
Make it possible to add command line options to the clippy invocation of the lintcheck-tool
changelog: none
r? `@matthiaskrgr`
I found that this will be really helpful if we use a separate repository and want to maintain a all-lints-passing list of crates. See my early experimentation here: https://github.com/flip1995/clippy-lintcheck
```
git submodule update --init
cargo run -- --mode=all
```
Will run the lintcheck tool on all the specified crates in `config/` in that repository.
New lint: default_numeric_fallback
fixes#6064
r? `@flip1995`
As we discussed in [here](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Issue.20.236064/near/224647188) and [here](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Issue.20clippy.236064/near/224746333), I start implementing this lint from the strictest version.
In this PR, I'll allow the below two cases to pass the lint to reduce FPs.
1. Appearances of unsuffixed numeric literals in `Local` if `Local` has a type annotation, for example:
```rust
// Good.
let x: i32 = 1;
// Also good.
let x: (i32, i32) = if cond {
(1, 2)
} else {
(2, 3)
};
```
2. Appearances of unsuffixed numeric literals in args of `Call` or `MethodCall` if corresponding arguments of their signature have concrete types, for example:
```rust
fn foo_mono(x: i32) -> i32 {
x
}
fn foo_poly<T>(t: T) -> t {
t
}
// Good.
let x = foo_mono(13);
// Still bad.
let x: i32 = foo_poly(13);
```
changelog: Added restriction lint: `default_numeric_fallback`
more lintcheck updates
* do some refactoring and renaming here and there
* add comments to functions
* fix bug where git repos would not get checked out to the proper commits (cmd was not actually run in repo directory 😅 )
* print warnings if we can't clone or check out a git repo
* filter out noise from cargo-metadata errors and lint messages that contained absolute file paths (these would change with every pinned-nightly bump, polluting the logs)
changelog: more lintcheck refactoring and fixes for git crates
Upgrade compiletest-rs to 0.6 and tester to 0.9
These updates allow us to specify multiple testnames for `TESTNAME` by
providing a comma separated list of testnames.
The new version of compiletest-rs also includes `bless` support, but is
not enabled with this PR.
cc #5394
changelog: none
These updates allow us to specify multiple testnames for `TESTNAME`.
The new version of compiletest-rs also includes `bless` support, but is
not enabled with this PR.
Do not lint when the closure is called using an iterator
Fix FP when the closure is used in an iterator for `blocks_in_if_conditions` lint
FIxes: #1141
changelog: none
Add a minimal reproducer for the ICE in #6179
This PR is an auxiliary PR for #6179, just add a minimal reproducer for the ICE discussed in #6179.
See #6179 for more details.
changelog: none
lintcheck: accept env var to set crates.toml file
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: lintcheck: accept LINTCHECK_TOML env var to set list of crates to be checked.