Commit graph

238 commits

Author SHA1 Message Date
Matthias Krüger
a62e4263d5 rename cargo dev ra_setup to cargo dev ide_setup 2021-03-17 10:12:45 +01:00
Matthias Krüger
b068b742ee lintcheck: fix --fix and document it in the readme.
also hook lintcheck into clippy-dev so that `clippy dev fmt` formats it.
2021-03-11 15:27:30 +01:00
Matthias Krüger
d859a17cdd lintcheck: update readme and remove the now redundant readme from clippy-dev 2021-03-11 15:27:30 +01:00
Matthias Krüger
fac6da1cfb move testfiles to "lintcheck" and fix more paths 2021-03-11 15:27:26 +01:00
Matthias Krüger
2546e6f006 lintcheck: move out of clippy-dev into own crate 2021-03-11 13:26:26 +01:00
flip1995
8e1ce480b9
Set Clippy authors to "The Rust Clippy Developers"
Clippy has grown enough, that putting specific people in the "authors"
field is warranted anymore.
2021-03-09 17:50:04 +01:00
Matthias Krüger
45424c7e75 lintcheck: add --fix mode which tries to apply lint suggestions to the sources and prints a warning if that fails
Great for spotting false positives/broken suggestions of applicable lints.

There are false positives though becasue I'm not sure yet how to silence rustc warnings while keeping clippy warnings.
Sometimes rustc makes a suggestion that fails to apply and the implementation does not differenciate between clippy and rustc warnings when applying lint suggestions.

changelog: none
2021-03-05 17:11:21 +01:00
flip1995
74eb44834c
Extract directory creation into its own function 2021-03-05 14:06:43 +01:00
flip1995
4aaad086d2
Fix dogfood errors in clippy_dev 2021-03-05 13:36:55 +01:00
Matthias Krüger
37c4b11a84 lintcheck: add test 2021-03-04 22:33:35 +01:00
Matthias Krüger
bbe641678c lintcheck: fix clippy warnings 2021-03-04 11:00:39 +01:00
Matthias Krüger
25f909863b update lintcheck_crates logs and fix typos 2021-02-28 23:07:12 +01:00
Matthias Krüger
45d6a77ce8 lintcheck: add more embark crate sources to the sources toml 2021-02-28 23:07:11 +01:00
Matthias Krüger
1ebaae8a15 lintcheck: make download path and source path consts, move source directory from traget/lintcheck/crates to target/lintcheck/sources
also update logfile with the dtolnay crates
2021-02-28 23:07:09 +01:00
Matthias Krüger
70d952e751 lintcheck: more fixes
fix a couple of issues when checking if lintcheck needed rerun after clippy binary changed.
I was apparently still comparing the times wrongly, but it should be fixed™ now...
I actually looked at the date of the sources.toml and not at the date of the log file!

Also fix progress report counter not advancing in squential mode
2021-02-28 22:59:46 +01:00
Matthias Krüger
b9a7a2a275 lintcheck: add a couple of dtolnays crates to the source list 2021-02-28 22:59:46 +01:00
Matthias Krüger
1b1ed9359e lintcheck: put the full paths (target/lintcheck/sources/<crate>...) to the source files of a warning into the lintcheck log
This is more convenient when reviewing new lint warnings that popped up in the logs
2021-02-28 22:59:45 +01:00
Matthias Krüger
e3386041a2 lintcheck: uses consts for clippy driver and cargo clippy paths 2021-02-28 22:53:52 +01:00
Matthias Krüger
2d9932d720 lintcheck: don't run clippy in parallel by default 2021-02-28 22:53:52 +01:00
Matthias Krüger
d931d1b5e6 lintcheck: refactor: introduce a basic LintcheckConfig struct which holds the job limit and paths to the sources and log files 2021-02-28 22:53:52 +01:00
Matthias Krüger
90cf27e9f6 lintcheck: update logs and do minor fixes 2021-02-26 11:18:59 +01:00
Matthias Krüger
3e1eea6c97 lintcheck: print stats how lint counts have changed between runs 2021-02-26 11:08:42 +01:00
Matthias Krüger
12dc03033f lintcheck: fix bug when getting the config toml path.
In order to check if we need to recheck crates, I was getting the path from clap only
which is None if we don't pass it via cmdline args.

Use the dedicated lintcheck_config_toml() fnuction instead!
2021-02-26 10:59:40 +01:00
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