Skip to content

Commit 8b9f4a0

Browse files
committed
Merge commit '70c0f90453701e7d6d9b99aaa1fc6a765937b736' into clippyup
1 parent 34b373d commit 8b9f4a0

File tree

80 files changed

+1802
-610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1802
-610
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,7 @@ Released 2018-09-13
18771877
[`box_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_vec
18781878
[`boxed_local`]: https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
18791879
[`builtin_type_shadow`]: https://rust-lang.github.io/rust-clippy/master/index.html#builtin_type_shadow
1880+
[`bytes_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth
18801881
[`cargo_common_metadata`]: https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata
18811882
[`case_sensitive_file_extension_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#case_sensitive_file_extension_comparisons
18821883
[`cast_lossless`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
@@ -1955,6 +1956,7 @@ Released 2018-09-13
19551956
[`field_reassign_with_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
19561957
[`filetype_is_file`]: https://rust-lang.github.io/rust-clippy/master/index.html#filetype_is_file
19571958
[`filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map
1959+
[`filter_map_identity`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity
19581960
[`filter_map_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_next
19591961
[`filter_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_next
19601962
[`find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#find_map
@@ -2039,6 +2041,7 @@ Released 2018-09-13
20392041
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
20402042
[`manual_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
20412043
[`manual_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find_map
2044+
[`manual_flatten`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
20422045
[`manual_memcpy`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
20432046
[`manual_non_exhaustive`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
20442047
[`manual_ok_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_or
@@ -2184,6 +2187,7 @@ Released 2018-09-13
21842187
[`same_item_push`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push
21852188
[`search_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
21862189
[`self_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#self_assignment
2190+
[`semicolon_if_nothing_returned`]: https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
21872191
[`serde_api_misuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#serde_api_misuse
21882192
[`shadow_reuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_reuse
21892193
[`shadow_same`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_same

clippy_dev/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ edition = "2018"
99
bytecount = "0.6"
1010
clap = "2.33"
1111
flate2 = { version = "1.0.19", optional = true }
12+
fs_extra = { version = "1.2.0", optional = true }
1213
itertools = "0.9"
1314
opener = "0.4"
1415
regex = "1"
@@ -21,5 +22,5 @@ ureq = { version = "2.0.0-rc3", optional = true }
2122
walkdir = "2"
2223

2324
[features]
24-
lintcheck = ["flate2", "serde_json", "tar", "toml", "ureq", "serde"]
25+
lintcheck = ["flate2", "serde_json", "tar", "toml", "ureq", "serde", "fs_extra"]
2526
deny-warnings = []

clippy_dev/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Clippy Dev Tool
2+
3+
The Clippy Dev Tool is a tool to ease Clippy development, similar to `rustc`s `x.py`.
4+
5+
Functionalities (incomplete):
6+
7+
## `lintcheck`
8+
Runs clippy on a fixed set of crates read from `clippy_dev/lintcheck_crates.toml`
9+
and saves logs of the lint warnings into the repo.
10+
We can then check the diff and spot new or disappearing warnings.
11+
12+
From the repo root, run:
13+
````
14+
cargo run --target-dir clippy_dev/target --package clippy_dev \
15+
--bin clippy_dev --manifest-path clippy_dev/Cargo.toml --features lintcheck -- lintcheck
16+
````
17+
or
18+
````
19+
cargo dev-lintcheck
20+
````
21+
22+
By default the logs will be saved into `lintcheck-logs/lintcheck_crates_logs.txt`.
23+
24+
You can set a custom sources.toml by adding `--crates-toml custom.toml`
25+
where `custom.toml` must be a relative path from the repo root.
26+
27+
The results will then be saved to `lintcheck-logs/custom_logs.toml`.
28+

clippy_dev/lintcheck_crates.toml

+20-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
[crates]
22
# some of these are from cargotest
3-
cargo = ['0.49.0']
4-
iron = ['0.6.1']
5-
ripgrep = ['12.1.1']
6-
xsv = ['0.13.0']
7-
#tokei = ['12.0.4']
8-
rayon = ['1.5.0']
9-
serde = ['1.0.118']
3+
cargo = {name = "cargo", versions = ['0.49.0']}
4+
iron = {name = "iron", versions = ['0.6.1']}
5+
ripgrep = {name = "ripgrep", versions = ['12.1.1']}
6+
xsv = {name = "xsv", versions = ['0.13.0']}
7+
# commented out because of 173K clippy::match_same_arms msgs in language_type.rs
8+
#tokei = { name = "tokei", versions = ['12.0.4']}
9+
rayon = {name = "rayon", versions = ['1.5.0']}
10+
serde = {name = "serde", versions = ['1.0.118']}
1011
# top 10 crates.io dls
11-
bitflags = ['1.2.1']
12-
libc = ['0.2.81']
13-
log = ['0.4.11']
14-
proc-macro2 = ['1.0.24']
15-
quote = ['1.0.7']
16-
rand = ['0.7.3']
17-
rand_core = ['0.6.0']
18-
regex = ['1.3.2']
19-
syn = ['1.0.54']
20-
unicode-xid = ['0.2.1']
12+
bitflags = {name = "bitflags", versions = ['1.2.1']}
13+
# crash = {name = "clippy_crash", path = "/tmp/clippy_crash"}
14+
libc = {name = "libc", versions = ['0.2.81']}
15+
log = {name = "log", versions = ['0.4.11']}
16+
proc-macro2 = {name = "proc-macro2", versions = ['1.0.24']}
17+
puffin = {name = "puffin", git_url = "https://github.com/EmbarkStudios/puffin", git_hash = "02dd4a3"}
18+
quote = {name = "quote", versions = ['1.0.7']}
19+
rand = {name = "rand", versions = ['0.7.3']}
20+
rand_core = {name = "rand_core", versions = ['0.6.0']}
21+
regex = {name = "regex", versions = ['1.3.2']}
22+
syn = {name = "syn", versions = ['1.0.54']}
23+
unicode-xid = {name = "unicode-xid", versions = ['0.2.1']}

0 commit comments

Comments
 (0)