Commit Graph

69 Commits

Author SHA1 Message Date
Jakub Wieczorek
2a13e83f2b Update all the code to pass the updated use_self lint.
One struct required a temporary `#[allow(dead_code)]` annotation due to
a bug in the Rust compiler: https://github.com/rust-lang/rust/issues/63151.
2019-07-31 08:50:43 +00:00
Philipp Hansch
35b7a98f4f
Decrease maximum length for stderr files
Now at 275.
2019-07-17 21:13:33 +02:00
Michael Wright
2c90083f62 Avoid rustfmt bug on Windows 2019-07-11 05:21:44 +00:00
Michael Wright
11707f3443
Fix crash on dev --limit-stderr-length 2019-07-07 15:11:37 +02:00
Michael Wright
4c771c3478
Add dev fmt subcommand 2019-07-07 15:11:33 +02:00
flip1995
0e480ca4bc
Use replace_region_in_file for creating the lint list 2019-06-14 13:07:33 +02:00
Jane Lusby
a2bf96f1c6 make it pass dogfood 2019-06-12 12:29:37 -07:00
Jane Lusby
113ae891d9 run rustfmt 2019-06-12 12:29:37 -07:00
Jane Lusby
73259d68db fix padding and put clippy someplaces 2019-06-12 12:29:37 -07:00
Jane Lusby
cfd7e0d5fd show default lint levels 2019-06-12 12:29:37 -07:00
Jane Lusby
296794dec5 prelim arg parse 2019-06-12 12:29:37 -07:00
Jane Lusby
5abcff2be5 move Lint static def into its own module 2019-06-12 12:29:37 -07:00
Jane Lusby
f6367c41dc switch to sorted usable lints 2019-06-12 12:29:37 -07:00
Jane Lusby
44b849521e Update clippy_dev/src/main.rs
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-06-12 12:29:37 -07:00
Jane Lusby
cf88c8487a initial commit for help improvements on clippy-driver 2019-06-12 12:29:37 -07:00
Lzu Tao
352f183429 Bump clap in clippy_dev 2019-06-03 09:36:23 +07:00
Philipp Hansch
619a2906f8
Collect at callsite, use eprintln instead of println 2019-05-17 07:41:25 +02:00
Philipp Hansch
d9a8a8a778
Add a stderr file length check to clippy_dev
This adds a check to `clippy_dev` that enforces a maximum line count for
`stderr` files. CI will fail if the line count is exceeded. It's
currently set to `320` lines.

Ideally this would be implemented in `compiletest-rs` but there are
plans to move Rust's `compiletest` into the `compiletest-rs` repository
and I don't want to do the work in `compiletest` twice. However, I also
don't want to wait until the move is done, so I added the check to
`clippy_dev` until it makes sense to add it to compiletest-rs.

cc #2038
2019-05-16 21:18:32 +02:00
flip1995
118f7d54c4
Remove rust-toolchain file from clippy_dev 2019-04-16 17:17:07 +02:00
flip1995
5361b842d1
Remove clippy::default_hash_types internal lint 2019-04-15 13:21:52 +02:00
Michael Wright
ecc5c0a57d Add rust-toolchain for clippy_dev 2019-03-15 08:17:44 +02:00
Alexander Regueiro
d43966a176 Various cosmetic improvements. 2019-03-10 18:06:28 +00:00
Michael Wright
acd6d4d094 Improve Clippy dev help
+ Print help if no subcommand is supplied
+ Make a short version of `update_lints` help for the subcommand listing
2019-03-08 07:45:31 +02:00
Andy Russell
fe96ffeac9
move lint documentation into macro invocations 2019-03-05 18:45:08 -05:00
Grzegorz
16881390e1 removing redundant closures in the whole project 2019-02-10 13:35:44 +01:00
Matthias Krüger
873fe11ca5 dependencies: update itertools from 0.7 to 0.8 2019-01-25 20:25:14 +01:00
Philipp Hansch
38d4ac7cea
Remove all copyright license headers
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2019-01-08 21:46:39 +01:00
Matthias Krüger
7f5e17f3f1 fix a couple of ftrivial typos (NFC). 2018-12-25 18:22:34 +01:00
flip1995
f9c0e2a4cb
Run rustfmt on clippy_dev 2018-11-27 21:13:08 +01:00
Matthias Krüger
f5929e0797 rust-lang-nursery/rust-clippy => rust-lang/rust-clippy 2018-11-22 04:40:09 +01:00
Philipp Hansch
745a619657
Fix dogfood 2018-11-05 07:18:47 +01:00
Philipp Krones
5b24f23020
Update println! formatting
Co-Authored-By: phansch <dev@phansch.net>
2018-11-05 07:18:47 +01:00
Philipp Hansch
f6194f33d2
Fix false positive in check mode caused by gen_deprecated
`gen_deprecated` should never have created the string with linebreaks.

Using a single string broke the check because the changed lines were
different.
2018-11-05 07:18:47 +01:00
Philipp Hansch
90f31e21ab
RIIR update lints: Add check mode (update_lints.py rewrite complete)
This finishes up the rewrite of `update_lints.py` in Rust. More
specifically, this

* adds the `--check` flag and handling to clippy_dev
* tracks file changes over the different calls to `replace_region_in_file`
* only writes changes to files if the `--check` flag is *not* used
* runs `./util/dev update_lints --check` on CI instead of the old script
* replaces usage of the `update_lints.py` script with an error

`./util/dev update_lints` behaves 99% the same as the python script.
The only difference that I'm aware of is an ordering change to
`clippy_lints/src/lib.rs` because underscores seem to be sorted
differently in Rust and in Python.

🏁
2018-11-05 07:18:47 +01:00
bors[bot]
a07c271559 Merge #3399
3399: RIIR update lints: Generate modules section and lint group sections r=flip1995 a=phansch

This adds the last missing parts of the generating code.

cc #2882

Co-authored-by: Philipp Hansch <dev@phansch.net>
2018-11-03 19:11:35 +00:00
Philipp Hansch
facfb5a7a9
Fix typo 2018-11-03 18:48:39 +01:00
Philipp Hansch
cca50701d9
Improve clippy_dev help text 2018-11-03 13:43:35 +01:00
Philipp Hansch
4f38538d75
RIIR update lints: Generate lint group registrations 2018-11-03 13:43:35 +01:00
Philipp Hansch
6e3320c7ef
Test clippy_dev on CI and fix test 2018-11-03 10:58:45 +01:00
Philipp Hansch
5fc25d30e2
RIIR update lints: Generate modules section 2018-11-03 09:09:34 +01:00
Matthias Krüger
df7cff31dc clippy: fix pedantic warnings and run clippy::pedantic lints on the codebase.
Turn on pedantic lints in dogfood and base tests.

needless_bool: fix clippy::items-after-statements
redundant_pattern_matching: fix clippy::similar-names
mods.rs: fix clippy::explicit-iter-loop
returns.rs: allow clippy::cast-possible-wrap

Fixes #3172
2018-11-02 12:16:43 +01:00
Philipp Hansch
7e027217f1
Fix dogfood and pedantic lints 2018-10-31 21:54:30 +01:00
Philipp Hansch
64bd658516
RIIR update lints: Generate deprecated lints
The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.

Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.
2018-10-31 08:03:50 +01:00
Philipp Hansch
9f3ac4e5a3
RIIR update_lints: Update changelog links
This now also updates the link list at the bottom of the changelog.
2018-10-17 08:18:05 +02:00
Philipp Hansch
05ffc2d057
Fix dogfood
`expect_fun_call` causes a false-positive, so I disabled it for now.
2018-10-16 20:58:00 +02:00
Philipp Hansch
956987f43e
RIIR update_lints: Replace lint count in README.md
This allows the usage of `util/dev update_lints` which will write the
new lint_count to the `README.md`.
2018-10-16 08:14:32 +02:00
Philipp Hansch
af441b5b07
Rename active_lints to usable_lints
Because now `usable_lints` will also exclude internal lints.
2018-10-16 08:09:32 +02:00
Philipp Hansch
b5dd8f17d1
Add comment on WalkDir vs. fs::read_dir 2018-10-15 21:10:22 +02:00
Philipp Hansch
b61ca63c5e
sort_by -> sort_by_key 2018-10-15 21:02:38 +02:00
Philipp Hansch
fb830c53db
Some more documentation for clippy_dev 2018-10-15 20:47:19 +02:00