Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Clippy #81993

Merged
merged 99 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
949b125
Add unit tests for new lint
nahuakang Jan 27, 2021
5753614
Draft skeleton for new lint
nahuakang Jan 27, 2021
3da25ed
Rename lint
nahuakang Jan 27, 2021
8973f2c
Run cargo dev update_lints
nahuakang Jan 27, 2021
b87e189
Implement manual flatten lint
nahuakang Jan 29, 2021
7825bf3
Fix suggestions that need parens
ThibsG Jan 31, 2021
e07cd5b
Enhance manual flatten
nahuakang Feb 2, 2021
c8cb90a
Merge commit '3e4179766bcecd712824da04356621b8df012ea4' into sync-fro…
Manishearth Feb 3, 2021
0f5e71f
Add additional check on if arg type has iter method
nahuakang Feb 3, 2021
f2e82af
Use PrimTy in builtin type shadow lint
camsteffen Feb 2, 2021
6396b8f
Fix file names of flat_map_identity test
magurotuna Feb 3, 2021
876ffa4
Auto merge of #6669 - magurotuna:fix-test-name, r=flip1995
bors Feb 3, 2021
78ef0f2
Add additional test cases and improve span lint
nahuakang Feb 3, 2021
0767a0f
Fix/allow non_fmt_panic in clippy tests.
m-ou-se Feb 2, 2021
9f7f8b7
Suggest panic!("{}", ..) instead of panic!(..) clippy::expect_fun_call.
m-ou-se Feb 3, 2021
2f8a8d3
Improve lint message; add note for future autofixable updates
nahuakang Feb 4, 2021
357c6a7
Auto merge of #6646 - nahuakang:for_loops_over_options_or_results, r=…
bors Feb 4, 2021
233fe11
Set turbofish for every sugg and add more test cases
ThibsG Feb 4, 2021
7b7e3ca
Support free functions in disallowed-methods lint
phlip9 Jan 30, 2021
67d48e1
fix typo
TaKO8Ki Feb 5, 2021
79dbf10
Use absolute path to Rust repo in ra_setup
flip1995 Feb 5, 2021
56f7fbb
Cleanup path to local checks
camsteffen Feb 2, 2021
89f266a
Auto merge of #6678 - TaKO8Ki:fix-typo, r=flip1995
bors Feb 5, 2021
a507c27
Auto merge of #6679 - flip1995:ra_setup_abs_path, r=Manishearth
bors Feb 5, 2021
eb9c669
First version of the lint
1c3t3a Dec 20, 2020
f907986
Added documentation
1c3t3a Dec 21, 2020
55bfaa1
Fixed macro edge case for `semicolon_if_nothing_returned lint`
1c3t3a Feb 5, 2021
ac5e9c8
Fix let_underscore_drop implements Drop logic
camsteffen Feb 5, 2021
a9ad492
Bump clippy version
Mark-Simulacrum Feb 5, 2021
93daf27
tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()…
matthiaskrgr Feb 5, 2021
a60c143
Add new lint `filter_map_identity`
magurotuna Feb 3, 2021
fbe436b
Use flatten instead of filter_map
magurotuna Feb 6, 2021
cb30219
lintcheck: update logs
matthiaskrgr Feb 6, 2021
64982cc
lintcheck: make TomlCrate also accept git-data from lintcheck_crates.…
matthiaskrgr Feb 5, 2021
10fbafa
implement the download_and_extract() step for git sources
matthiaskrgr Feb 6, 2021
9ab505a
lintcheck: add git source as an example and update logs
matthiaskrgr Feb 6, 2021
e1c284b
lintcheck: cleanup, fix --only for git crates, better error msgs
matthiaskrgr Feb 6, 2021
6626295
Fixed for loop problem, corrected all occurences that got linted
1c3t3a Feb 6, 2021
dfb34c0
Auto merge of #6684 - matthiaskrgr:versiontest_dont_break_upstream, r…
bors Feb 6, 2021
cd67487
Revert "Fixed for loop problem, corrected all occurences that got lin…
1c3t3a Feb 6, 2021
85c2b1e
Switched to `snippet_with_macro_callsite`
1c3t3a Feb 6, 2021
a5d442c
Rollup merge of #81680 - camsteffen:primty, r=oli-obk
jonas-schievink Feb 6, 2021
f1c1584
Changed lint level to `restriction`
1c3t3a Feb 6, 2021
915e9b8
Fix cargo_common_metadata warning on `publish = false`.
daxpedda Jan 29, 2021
d4bc7d2
Test names were flipped.
daxpedda Feb 3, 2021
f0d3fd7
Implement `_cargo_ignore_publish`.
daxpedda Feb 3, 2021
8805931
Hide clippy configuration option.
daxpedda Feb 6, 2021
f2391a5
Change clippy configuration option.
daxpedda Feb 6, 2021
8b89087
Add test for `publish = true`.
daxpedda Feb 6, 2021
cd361a5
Add back `publish = false` to the old test.
daxpedda Feb 6, 2021
e2e33b4
Pick up `clippy.toml` in `ui-cargo` tests.
daxpedda Feb 6, 2021
3c8f754
Fux `toml_unknown_key` test.
daxpedda Feb 6, 2021
ea0b832
Document condition.
daxpedda Feb 6, 2021
fd8b5fa
Confused about my own explanation.
daxpedda Feb 6, 2021
2bffbfc
lintcheck: avoid dbg!() calls
matthiaskrgr Feb 6, 2021
0585c34
Stabilize workspace wrapper.
ehuss Feb 6, 2021
6b4789d
Fixed suggestion in macro invocations
1c3t3a Feb 6, 2021
40ce056
Eat dogfood
camsteffen Feb 5, 2021
dfe08f4
Update triagebot.toml to new label names
flip1995 Feb 6, 2021
d792210
Auto merge of #6682 - camsteffen:let-underscore-ref, r=llogiq
bors Feb 7, 2021
b36d1a4
Auto merge of #6688 - rust-lang:triagebot_update, r=phansch
bors Feb 7, 2021
d51db24
Auto merge of #6660 - camsteffen:path-to-local, r=llogiq
bors Feb 7, 2021
001185d
Auto merge of #6681 - 1c3t3a:1c3t3a-issue-6467, r=xFrednet,flip1995,p…
bors Feb 7, 2021
ad9ceee
Auto merge of #6685 - magurotuna:filter_map_identity, r=phansch
bors Feb 7, 2021
83b7b16
Auto merge of #6674 - phlip9:disallowed_functions, r=llogiq
bors Feb 7, 2021
c1ce78f
Auto merge of #6686 - matthiaskrgr:lintcheck_git, r=flip1995
bors Feb 7, 2021
6f3eeac
lintcheck: add a cmdline option --crates-toml <TOML PATH> to override…
matthiaskrgr Feb 7, 2021
1c3033d
add a new lint `bytes_nth`
TaKO8Ki Feb 7, 2021
de35c29
Auto merge of #6694 - matthiaskrgr:lintcheck-cfg, r=Manishearth
bors Feb 7, 2021
fd35517
Downgrade trivial_regex to nursery
dtolnay Feb 8, 2021
4bbd7e4
Auto merge of #6696 - dtolnay-contrib:regex, r=Manishearth
bors Feb 8, 2021
1d30422
Enhance LocalUsedVisitor to check closure bodies
camsteffen Feb 3, 2021
5db48a3
Refactor out UnusedSelfVisitor
camsteffen Feb 3, 2021
37555f8
Use path_to_local_id
camsteffen Feb 8, 2021
34b373d
Rename HIR UnOp variants
osa1 Feb 9, 2021
775ce47
Rename "good first issue" back to "good-first-issue"
flip1995 Feb 9, 2021
03a0dd5
Auto merge of #6704 - rust-lang:flip1995-patch-1, r=phansch
bors Feb 9, 2021
b932587
Add better turbofish extractor
ThibsG Feb 9, 2021
03737e2
Remove rustfmt from rust-toolchain file
flip1995 Feb 9, 2021
08b4d50
Auto merge of #6709 - rust-lang:flip1995-patch-1, r=matthiaskrgr
bors Feb 9, 2021
0e371b8
Auto merge of #6698 - camsteffen:path-to-local, r=phansch
bors Feb 10, 2021
932cc08
Update clippy_lints/src/methods/bytes_nth.rs
TaKO8Ki Feb 10, 2021
5996ae1
add some test cases
TaKO8Ki Feb 10, 2021
9c0ae2a
Auto merge of #6687 - ehuss:stabilize-wrapper, r=flip1995
bors Feb 10, 2021
b5e4389
Auto merge of #6695 - TaKO8Ki:add-bytes-nth, r=phansch
bors Feb 10, 2021
94b8f23
Fix typo
alpaca-tc Feb 10, 2021
a6d6b1b
Auto merge of #6714 - alpaca-tc:fixed_tiny_typo, r=flip1995
bors Feb 10, 2021
3784cdf
Auto merge of #6657 - ThibsG:FromIterParens, r=llogiq
bors Feb 10, 2021
beb49ba
Auto merge of #6650 - daxpedda:cargo-common-metadata-publish, r=flip1995
bors Feb 11, 2021
1025cd3
lintcheck toml: explain why tokei is commented out
matthiaskrgr Feb 9, 2021
c7241b6
lintcheck: make the log file be ${source-file}-logs.txt
matthiaskrgr Feb 9, 2021
cfe154b
start a clippy-dev readme and some rough info on how to use lintcheck
matthiaskrgr Feb 9, 2021
5e29aa6
lintcheck: add support for path sources
matthiaskrgr Feb 10, 2021
a6d493d
lintcheck: collect ICEs
matthiaskrgr Feb 10, 2021
8dbcffe
Auto merge of #6708 - matthiaskrgr:lintcheck, r=flip1995
bors Feb 11, 2021
00f9981
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Feb 11, 2021
4efc454
Bump nightly version -> 2021-02-11
flip1995 Feb 11, 2021
70c0f90
Auto merge of #6718 - flip1995:rustup, r=flip1995
bors Feb 11, 2021
d2e2f64
Merge commit '70c0f90453701e7d6d9b99aaa1fc6a765937b736' into clippyup
flip1995 Feb 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1877,6 +1877,7 @@ Released 2018-09-13
[`box_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_vec
[`boxed_local`]: https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
[`builtin_type_shadow`]: https://rust-lang.github.io/rust-clippy/master/index.html#builtin_type_shadow
[`bytes_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth
[`cargo_common_metadata`]: https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata
[`case_sensitive_file_extension_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#case_sensitive_file_extension_comparisons
[`cast_lossless`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
Expand Down Expand Up @@ -1955,6 +1956,7 @@ Released 2018-09-13
[`field_reassign_with_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
[`filetype_is_file`]: https://rust-lang.github.io/rust-clippy/master/index.html#filetype_is_file
[`filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map
[`filter_map_identity`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity
[`filter_map_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_next
[`filter_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#filter_next
[`find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#find_map
Expand Down Expand Up @@ -2039,6 +2041,7 @@ Released 2018-09-13
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
[`manual_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
[`manual_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find_map
[`manual_flatten`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
[`manual_memcpy`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
[`manual_non_exhaustive`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
[`manual_ok_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_or
Expand Down Expand Up @@ -2184,6 +2187,7 @@ Released 2018-09-13
[`same_item_push`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push
[`search_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
[`self_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#self_assignment
[`semicolon_if_nothing_returned`]: https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
[`serde_api_misuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#serde_api_misuse
[`shadow_reuse`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_reuse
[`shadow_same`]: https://rust-lang.github.io/rust-clippy/master/index.html#shadow_same
Expand Down
3 changes: 2 additions & 1 deletion src/tools/clippy/clippy_dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ edition = "2018"
bytecount = "0.6"
clap = "2.33"
flate2 = { version = "1.0.19", optional = true }
fs_extra = { version = "1.2.0", optional = true }
itertools = "0.9"
opener = "0.4"
regex = "1"
Expand All @@ -21,5 +22,5 @@ ureq = { version = "2.0.0-rc3", optional = true }
walkdir = "2"

[features]
lintcheck = ["flate2", "serde_json", "tar", "toml", "ureq", "serde"]
lintcheck = ["flate2", "serde_json", "tar", "toml", "ureq", "serde", "fs_extra"]
deny-warnings = []
28 changes: 28 additions & 0 deletions src/tools/clippy/clippy_dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Clippy Dev Tool

The Clippy Dev Tool is a tool to ease Clippy development, similar to `rustc`s `x.py`.

Functionalities (incomplete):

## `lintcheck`
Runs clippy on a fixed set of crates read from `clippy_dev/lintcheck_crates.toml`
and saves logs of the lint warnings into the repo.
We can then check the diff and spot new or disappearing warnings.

From the repo root, run:
````
cargo run --target-dir clippy_dev/target --package clippy_dev \
--bin clippy_dev --manifest-path clippy_dev/Cargo.toml --features lintcheck -- lintcheck
````
or
````
cargo dev-lintcheck
````

By default the logs will be saved into `lintcheck-logs/lintcheck_crates_logs.txt`.

You can set a custom sources.toml by adding `--crates-toml custom.toml`
where `custom.toml` must be a relative path from the repo root.

The results will then be saved to `lintcheck-logs/custom_logs.toml`.

37 changes: 20 additions & 17 deletions src/tools/clippy/clippy_dev/lintcheck_crates.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
[crates]
# some of these are from cargotest
cargo = ['0.49.0']
iron = ['0.6.1']
ripgrep = ['12.1.1']
xsv = ['0.13.0']
#tokei = ['12.0.4']
rayon = ['1.5.0']
serde = ['1.0.118']
cargo = {name = "cargo", versions = ['0.49.0']}
iron = {name = "iron", versions = ['0.6.1']}
ripgrep = {name = "ripgrep", versions = ['12.1.1']}
xsv = {name = "xsv", versions = ['0.13.0']}
# commented out because of 173K clippy::match_same_arms msgs in language_type.rs
#tokei = { name = "tokei", versions = ['12.0.4']}
rayon = {name = "rayon", versions = ['1.5.0']}
serde = {name = "serde", versions = ['1.0.118']}
# top 10 crates.io dls
bitflags = ['1.2.1']
libc = ['0.2.81']
log = ['0.4.11']
proc-macro2 = ['1.0.24']
quote = ['1.0.7']
rand = ['0.7.3']
rand_core = ['0.6.0']
regex = ['1.3.2']
syn = ['1.0.54']
unicode-xid = ['0.2.1']
bitflags = {name = "bitflags", versions = ['1.2.1']}
# crash = {name = "clippy_crash", path = "/tmp/clippy_crash"}
libc = {name = "libc", versions = ['0.2.81']}
log = {name = "log", versions = ['0.4.11']}
proc-macro2 = {name = "proc-macro2", versions = ['1.0.24']}
puffin = {name = "puffin", git_url = "https://github.com/EmbarkStudios/puffin", git_hash = "02dd4a3"}
quote = {name = "quote", versions = ['1.0.7']}
rand = {name = "rand", versions = ['0.7.3']}
rand_core = {name = "rand_core", versions = ['0.6.0']}
regex = {name = "regex", versions = ['1.3.2']}
syn = {name = "syn", versions = ['1.0.54']}
unicode-xid = {name = "unicode-xid", versions = ['0.2.1']}
Loading