Commit Graph

29 Commits

Author SHA1 Message Date
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
Philipp Hansch
7da97a94df
Use WalkDir to also gather from subdirectories
`fs::read_dir` does not recurse into subdirectories.
2018-10-15 20:44:22 +02:00
Oliver Scherer
b8654eaa6c Stabilize tool lints 2018-10-11 12:16:22 +02:00
Philipp Hansch
759ceb9840
Use impl Iterator in arg position in clippy_dev
Small refactoring pulled out of work on #3266.
This should make the methods a bit more flexible.
2018-10-11 08:34:51 +02:00
Manish Goregaokar
e9c025ea70 Add license header to Rust files 2018-10-06 09:43:08 -07:00
Matthias Krüger
91f7e22edf remove cargo edition 2018 feature gate.
Rust and the cargo used to bootstrap was updated in https://github.com/rust-lang/rust/pull/54601 which now has the 2018 edition stabilized.
2018-09-30 11:12:24 +02:00
Philipp Krones
67d85bc47d
Merge pull request #3224 from matthiaskrgr/clippy_self__use_self
fix some clippy::pedantic warnings found in the codebase.
2018-09-28 15:26:50 +02:00
Matthias Krüger
e7b820d626 consistently gitignore all Cargo.lock files 2018-09-27 12:34:16 +02:00
Matthias Krüger
2a31937cc9 fix all clippy::use_self pedantic warnings found in the codebase.
cc #3172
2018-09-26 22:24:18 +02:00
Matthias Krüger
f2ecee3638 clippy_dev: port to edition 2018 2018-09-23 14:44:06 +02:00
flip1995
e28440d2e0
Change Hash{Map, Set} to FxHash{Map, Set} 2018-09-12 01:34:52 +02:00
Philipp Hansch
3bdc691a91
Pass by ref instead of value 2018-09-06 08:19:09 +02:00
Philipp Hansch
de36d42e80
More refactoring 2018-09-06 07:15:31 +02:00
Philipp Hansch
20836d3003
Remove duplicated .gitignore 2018-09-05 13:35:57 +02:00
Philipp Hansch
79bec036f8
Return impl Iterator instead of Vec<Lint>
This makes the API of `lib.rs` a bit more flexible.
2018-09-05 13:34:28 +02:00
Philipp Hansch
586ef4ed72
Refactor to use into_group_map from Itertools 2018-09-03 22:18:53 +02:00
Philipp Hansch
78d358b861
s/direntry/dir_entry 2018-09-03 22:18:53 +02:00
Philipp Hansch
70312430dd
Use insignificant whitespace mode for nice regex 2018-09-03 22:18:53 +02:00
Philipp Hansch
502357df65
cargo update in clippy_dev 2018-09-03 22:18:53 +02:00
Philipp Hansch
35f100b4f9
update_lints rewrite: Add structure and --print-only 2018-09-03 22:18:51 +02:00