Commit Graph

215 Commits

Author SHA1 Message Date
Matthias Krüger
eaae95b613 lintcheck fix build (forgot to pass function parameter) and runtime (don't check metadata of directory if it does not exist) 2021-02-23 12:58:12 +01:00
Matthias Krüger
363f6d3dc6 lintcheck: rerun if clippy changed
Automatically clean lintchecks shared target dir (will force clippy to recheck sources) if
the clippy binaries are older than the lintcheck logs.

Also update lintcheck logs
2021-02-23 08:32:50 +01:00
Yoshitomo Nakanishi
5fe3b6c41a Quick fix cargo dev bless 2021-02-22 12:45:11 +09:00
Matthias Krüger
8499a32859 lintcheck: add -j <N> option to configure threads.
defaults to 1
-j 0 choses the number of threads automtically (= number of physical cores)
2021-02-19 23:20:05 +01:00
Matthias Krüger
22aeec09e4 lintcheck: sort crates before linting 2021-02-19 22:16:53 +01:00
Matthias Krüger
4974734a24 lintcheck: show progress percentage in the "Linting..." message 2021-02-19 22:06:50 +01:00
Matthias Krüger
d198551311 lintheck: show output (and compiler errors!) when compiling clippy for lintcheck 2021-02-19 21:52:34 +01:00
Matthias Krüger
bb5f9d18a0 lintcheck: tweak some comments 2021-02-19 21:48:52 +01:00
Matthias Krüger
90d3275b45 lintcheck: parallelize
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).
2021-02-19 00:14:43 +01:00
flip1995
79d7f4ccb3
lintcheck: Add a note that -Wclippy::all is enabled by default 2021-02-17 08:35:57 +01:00
flip1995
e3f584665a
Reformat clippy_dev README 2021-02-16 18:09:34 +01:00
flip1995
dd5c9b7dda
lintcheck: Slight improvements to the error reporting 2021-02-16 16:58:00 +01:00
flip1995
2a28ea0bea
Add command line options option to lintcheck crates config 2021-02-16 16:57:30 +01:00
Matthias Krüger
028692b46a lintcheck: filter out messages that come from cargo-metadata errors or contain absolute paths to rustc source files
The latter is especially annoying because the paths would change every time we bumped the pinned nightly version.
2021-02-15 23:38:50 +01:00
Matthias Krüger
8f1cceb6ff lintcheck: print warnings if we can't check out or clone a git repo 2021-02-15 22:48:33 +01:00
Matthias Krüger
f8dbcae9f4 lintcheck: fix bug in downloade_and_extract() for git sources: we need to execute "git checkout xy" inside the repo dir! 2021-02-15 22:48:32 +01:00
Matthias Krüger
214d821268 lintcheck: put some code into a gather_stats() function 2021-02-15 22:13:17 +01:00
Matthias Krüger
4856e5f8fc lintcheck: rename a few symbols, add documentation to functions 2021-02-15 22:13:17 +01:00
Matthias Krüger
1b74439871 lintcheck: rename struct field 2021-02-15 22:13:17 +01:00
Philipp Krones
0256103c10
Use title case in clippy_dev README 2021-02-13 16:55:01 +01:00
Matthias Krüger
fedfbb9011 lintcheck: explain sources.toml configuration 2021-02-13 01:28:00 +01:00
Matthias Krüger
5bbb1bc20a lintcheck: env var LINTCHECK_TOML can be used to override toml file location (has precedence over --crates-toml flag) 2021-02-13 00:39:19 +01:00
Matthias Krüger
a6d493d52a lintcheck: collect ICEs 2021-02-11 10:43:06 +01:00
Matthias Krüger
5e29aa6fdf lintcheck: add support for path sources 2021-02-11 10:43:04 +01:00
Matthias Krüger
cfe154be8c start a clippy-dev readme and some rough info on how to use lintcheck 2021-02-11 10:41:31 +01:00
Matthias Krüger
c7241b6e5e lintcheck: make the log file be ${source-file}-logs.txt
this allows us to check multiple source.tomls and not worry about overriding our logfiles accidentally
2021-02-11 10:41:31 +01:00
Matthias Krüger
1025cd349d lintcheck toml: explain why tokei is commented out 2021-02-11 10:41:31 +01:00
Matthias Krüger
6f3eeac83c lintcheck: add a cmdline option --crates-toml <TOML PATH> to override crate sources file to use.
Fixes #6691
2021-02-07 16:14:43 +01:00
bors
c1ce78f0b2 Auto merge of #6686 - matthiaskrgr:lintcheck_git, r=flip1995
lintcheck: support git sources

This adds support for git sources in `cargo dev-lintcheck`

You can add a git source to `clippy_dev/lintcheck_crates.toml` by having a `git_url` and a `git_hash` key instead of the `versions` array.
The repo will the be cloned and checked out to the requested commit before checking it with clippy.

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

changelog: lintcheck: support git sources
2021-02-07 13:25:00 +00:00
bors
d792210c26 Auto merge of #6682 - camsteffen:let-underscore-ref, r=llogiq
Fix let_underscore_drop FP

changelog: Fix let_underscore_drop false positives and negatives

Fixes #6633
2021-02-07 08:13:42 +00:00
Cameron Steffen
40ce05654b Eat dogfood 2021-02-06 16:35:38 -06:00
Matthias Krüger
2bffbfccc1 lintcheck: avoid dbg!() calls 2021-02-06 19:12:58 +01:00
Matthias Krüger
e1c284bff7 lintcheck: cleanup, fix --only for git crates, better error msgs 2021-02-06 12:24:13 +01:00
Matthias Krüger
9ab505a3c7 lintcheck: add git source as an example and update logs 2021-02-06 12:11:31 +01:00
Matthias Krüger
10fbafa562 implement the download_and_extract() step for git sources 2021-02-06 12:10:47 +01:00
Matthias Krüger
64982cc435 lintcheck: make TomlCrate also accept git-data from lintcheck_crates.toml 2021-02-06 12:10:45 +01:00
flip1995
79dbf10736
Use absolute path to Rust repo in ra_setup
This will convert the path to the Rust repo to an absolute path. This is
important for the clippy_lints/Cargo.toml file. Otherwise if a relative
path is passed, rst-analyzer won't find the Rust repo, because it starts
the relative path search from the clippy_lints dir, not the
rust-clippy dir where the ra_setup command was run from.
2021-02-05 17:23:04 +01:00
Caden Haustein
bde667af7e
Add missing_panics_doc lint 2021-02-02 16:36:32 +01:00
Philipp Hansch
da26b2149f
clippy_dev: Pass stderr to CommandFailed 2021-01-31 11:21:33 +01:00
Matthias Krüger
5b6a18362b lintcheck: fix paths in the logs 2021-01-23 02:18:11 +01:00
Matthias Krüger
83fcf95f52 rename cargo dev crater to cargo dev lintcheck 2021-01-23 02:18:11 +01:00
Matthias Krüger
48fc948ca3 clippy dev crater: address more review commetns
make serde a feature-dep
save clippy version in the crater log
2021-01-23 02:18:11 +01:00
Matthias Krüger
ec1902ce43 cargo dev crater: throw an error if we can't find our specified crate in the .toml list 2021-01-23 02:18:11 +01:00
Matthias Krüger
b6ef1e282e clippy dev crater: add option to only check a single one of the listed crates with --only crate 2021-01-23 02:18:11 +01:00
Matthias Krüger
d257101109 make stats stable 2021-01-23 02:18:11 +01:00
Matthias Krüger
e56c9a5253 cargo dev crater: gather and save lint statistics (how often a lint triggered) 2021-01-23 02:18:11 +01:00
Matthias Krüger
4ec9cb84bb cargo dev crater: refactor to get a list of all ClippyWarnings 2021-01-23 02:18:11 +01:00
Matthias Krüger
6c5bf2778f clippy dev crater: use and parse clippy messages as json message, to get the lint name of a warning 2021-01-23 02:18:11 +01:00
Matthias Krüger
62337f2842 remove duplicate code and other cleanup 2021-01-23 02:18:11 +01:00
Matthias Krüger
22824d21da rename symbols: krate -> crate 2021-01-23 02:18:11 +01:00