Ethan Lam
327c91f8c7
Addresses Issue #4001
...
Fixed typo
Fixes lint name and uses appropriate linting suggestion
changed lint help message
Added autofixable test
Added Autofixable Test
Removed Broken Autofixable File
updated lints
Generated Autofixable/Nonfixable Test Cases
Changed Suggestion Applicability
Updated Lint Count
2019-10-08 08:46:29 -05:00
bors
b690cdb1e7
Auto merge of #4611 - rust-lang:doc-visibility, r=flip1995
...
account for doc visibility
This fixes #4608 .
Also I noticed that the lint failed to look at trait and impl items. There's a small bit of fallout in the code, too, but not enough to warrant its own commit.
changelog: check docs of trait items and impl items, also make `missing_safety_doc` account for visibility
2019-10-08 07:11:26 +00:00
bors
e2393b09ac
Auto merge of #4592 - rust-lang:transmute-collection, r=flip1995
...
New lint: `unsound_collection_transmute`
changelog: Add `unsound_collection_transmute` lint
This fixes #4515
2019-10-08 05:51:07 +00:00
flip1995
3d39379f9c
Move is_argument check into mutate
2019-10-06 14:49:26 +02:00
flip1995
b7d473503b
Merge consume and consume_pat in escape analysis
...
FIXME: This doesn't work and probably needs a rewrite of the lint
See https://github.com/rust-lang/rust-clippy/pull/4628#issuecomment-538574944
2019-10-05 12:23:59 +02:00
flip1995
c420b07191
Fix needless_pass_by_value
...
This also accidentally improved the spans of the suggestions
2019-10-04 15:39:46 +02:00
bors
54bf4ffd62
Auto merge of #4613 - Lythenas:lint-assert_eq-unit_exprs, r=flip1995
...
Add check for assert_eq macros to unit_cmp lint
changelog: Add check for unit comparisons through `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` macros to unit_cmp lint.
fixes #4481
2019-10-04 10:27:44 +00:00
Phil Hansch
19c58d260b
Rollup merge of #4614 - HMPerson1:abs_cast_unsigned, r=flip1995
...
Allow casts from the result of `abs` to unsigned
changelog: Allow casts from the result of `abs` to unsigned in `cast_sign_loss`
Fixes #4605
2019-10-04 08:08:59 +02:00
Matthias Seiffert
024dfee33c
Update unit_cmp tests to include blocks for asserts
2019-10-03 14:38:04 +02:00
Matthias Seiffert
320d17aa63
Update the .stderr to include the backticks
2019-10-03 12:01:02 +02:00
Shotaro Yamada
555f5a49a2
Test fixes
2019-10-03 08:10:29 +09:00
Shotaro Yamada
667223c35d
Add run-rustfix
2019-10-03 08:10:29 +09:00
Shotaro Yamada
301ef6bb2a
Fix false-positive of redundant_clone and move to clippy::perf
2019-10-03 08:10:29 +09:00
HMPerson1
0e1dd65c14
Allow casts from the result of abs
to unsigned
2019-10-02 17:23:54 -04:00
Matthias Seiffert
3557084b01
Add check for assert_eq macros to unit_cmp lint
2019-10-02 22:48:19 +02:00
Andre Bogus
27fa2b7944
New lint: unsound_collection_transmute
2019-10-02 21:18:00 +02:00
Andre Bogus
e3f143ff0a
account for doc visibility
2019-10-02 21:15:28 +02:00
Lzu Tao
6b1a8683f4
Add suggestion for zero-ptr lint
2019-10-02 22:38:00 +07:00
flip1995
87db6bb1e3
Add regression test for ICE #4579
2019-10-02 09:39:04 +02:00
Manish Goregaokar
4318854bfc
Remove tests that only ICE on CI
2019-10-01 16:45:07 -07:00
Manish Goregaokar
f513aa3a05
Allow const_err in out_of_bounds_indexing tests
2019-10-01 16:37:22 -07:00
James Wang
189eaa54c6
Ignore impls derived from macros
2019-09-27 20:47:00 -05:00
flip1995
fff6b0e17c
Remove clippy::author attribute from trailing_zeroes test
2019-09-27 18:10:18 +02:00
flip1995
b67dfb4896
Move author issue test to author subdir
2019-09-27 18:07:07 +02:00
flip1995
8d8ba14371
Fix author lint
2019-09-27 18:01:04 +02:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813
2019-09-27 17:21:20 +02:00
Michael Sproul
4f9d6eea5c
Detect assignment ops in integer_arithmetic
2019-09-27 11:55:42 +10:00
bors
adc1df11b4
Auto merge of #4568 - mikerite:fix-4548, r=flip1995
...
Fix `nonminimal-bool` false positive
Closes #4548
Closes #3847
changelog: Fix `nonminimal-bool` false positive
2019-09-26 08:06:16 +00:00
bors
4d30b08027
Auto merge of #4569 - james9909:add-comparison-chain, r=oli-obk
...
Add a new lint for comparison chains
changelog: Adds a new lint: `comparison_chain`.
`comparison_chain` lints all `if` conditional chains where all the conditions are binary comparisons on the same two operands and will suggest a rewrite with `match`.
Closes #4531 .
2019-09-26 07:38:08 +00:00
Lzu Tao
5639639d35
Remove unused attribute in test
2019-09-26 01:53:39 +00:00
Lzu Tao
08ce6bc6d9
Fix macro expansion in toplevel_ref_arg lint
2019-09-26 08:46:51 +07:00
Lzu Tao
3b9e5dfda5
Add regression test for macro expansion
2019-09-26 08:14:58 +07:00
Manish Goregaokar
b94f2e89fd
unnecessary_operation: make test rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
04dd580f37
unnecessary_clone: split rustfixable lint out into separate test
2019-09-25 14:45:18 -07:00
Manish Goregaokar
363e382f5b
string_add, string_add_assign: split tests, make one rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
1a4dcfca35
redundant_static_lifetimes: split test, make rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
ea16ab56d5
renamed_builtin_attr: make test rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
d28dacb33a
redundant_pattern_matching: make rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
a83a8dccba
redundant_closure_call: split tests into fixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
e4ff86dcd4
map_unit_fn: make test rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
ad0e7c8e7f
map_unit_fn: fix applicability
2019-09-25 14:45:18 -07:00
Manish Goregaokar
24c283ea12
option_map_unit_fn: Split into fixable/unfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
38a0785436
map_unit_fn: rename tests to fixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
1090509564
non_copy_const: remove incorrect suggestion
2019-09-25 14:45:18 -07:00
Manish Goregaokar
a9a3350455
needless_return: add allow()s to test, make rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
980650eec2
needless_collect: fix suggestion, make test rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
7f822e742d
needless_borrowed_ref: fix false positive, make rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
622b167eb8
needless_borrow: allow other lints, make fixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
0d8e4d7c37
mem_discriminant: split test, make rustfixable
2019-09-25 14:45:18 -07:00
Manish Goregaokar
483e140bce
map_flatten: make it a rustfix test
2019-09-25 14:45:18 -07:00