Oliver Schneider
3b7720f992
lint ! and != in if expressions with else branches
2016-02-29 12:34:48 +01:00
mcarton
5fadfb3ea6
Fix wrong suggestion in WHILE_LET_LOOP
...
Ok, I lied in the title. This basically *removes* the problematic part
but:
1) it was ugly with big bodies;
2) it was not indented properly;
3) it wasn’t very smart (see #675 ).
2016-02-28 12:09:28 +01:00
mcarton
62cbd87728
Fix false positive in FOR_KV_MAP
and &mut
refs
2016-02-26 12:51:26 +01:00
Manish Goregaokar
f13b841282
Merge branch 'pr-704'
...
Conflicts:
src/len_zero.rs
2016-02-25 01:38:08 +05:30
mcarton
783437eef0
Use span_suggestion
in loops lints
2016-02-24 20:54:35 +01:00
mcarton
b753e77cbe
Rustfmt and sort all use
items
2016-02-24 17:38:57 +01:00
Martin Carton
c47d5a615f
Merge pull request #690 from quininer/fix-nightly
...
fix nightly (2016-02-17)
2016-02-21 15:38:31 +01:00
mcarton
1a64a4890c
Small cleanup
2016-02-20 21:20:56 +01:00
mcarton
b6443b9928
Replace all format!("{}", foo)
calls
2016-02-20 21:03:45 +01:00
mcarton
222086d62b
Remove all use of format!("string literal")
2016-02-20 17:46:20 +01:00
quininer kel
35a48bf512
fix nightly
...
9b40e1e5b3
2016-02-19 04:16:39 +08:00
mcarton
cbe2de7fd2
Address small nit
2016-02-14 12:07:56 +01:00
mcarton
4562040d6b
Fix false positive in NEEDLESS_RANGE_LOOP
2016-02-13 22:09:17 +01:00
mcarton
34812e82d0
Use const_eval in loops
2016-02-09 21:22:30 +01:00
mcarton
83a82a1d86
Remove redundancy in lint documentation
...
The default level is always given in the declare_lint! macro, no need to
add it inconsistently in the documentation.
2016-02-06 00:41:54 +01:00
mcarton
13f245f6c9
Fix util/update_wiki.py warnings and be consistent in declare_lint! invocations
2016-02-06 00:13:29 +01:00
mcarton
c0063e172d
Improve error message
2016-02-05 19:46:11 +01:00
mcarton
0f50b0981d
Check for pattern use in FOR_KV_MAP
2016-02-05 19:14:02 +01:00
mcarton
431c446746
Lint looping on maps ignoring the keys or values
2016-02-05 19:13:14 +01:00
mcarton
db205c82a4
Add a lint about using clone
on Copy
types
2016-02-02 22:35:01 +01:00
mcarton
c0d2fdc723
Partially apply rustfmt
2016-02-02 22:34:20 +01:00
Oliver Schneider
3b1df8d381
fallout
2016-02-01 13:01:16 +01:00
Devon Hollowood
405d7c691e
Add for_loop_over_result lint
2016-01-29 15:24:17 -08:00
Devon Hollowood
f5cc94c96a
Add for_loop_over_option lint
2016-01-28 23:39:00 -08:00
Manish Goregaokar
c86a5ccd2e
Upgrade Rust to rustc 1.8.0-nightly (18b851bc5 2016-01-22)
...
fixes #573
2016-01-22 18:35:48 +05:30
mcarton
387e0991e3
Handle more iterator adapter cases in for loops
2016-01-14 20:58:32 +01:00
Manish Goregaokar
c9342d0121
fmt clippy
2016-01-04 09:56:12 +05:30
mcarton
0c6e385493
Implement a HashMapLint
2016-01-03 17:04:08 +01:00
Johannes Linke
06f30a61dd
Add "warn/allow by default" to lint descriptions where it was missing.
2016-01-01 17:48:19 +01:00
llogiq
c645a9febe
adding missing doc comments
2015-12-14 22:16:56 +01:00
Oliver Schneider
cc1d696cb9
fix fallout from CC improvements
2015-12-14 14:30:09 +01:00
llogiq
5bbc1427fd
added wiki comments + wiki-generating python script
2015-12-11 01:22:27 +01:00
Oliver Schneider
617c820e6b
compute cyclomatic complexity (adjusted to not punish Rust's match
)
2015-12-03 16:41:55 +01:00
Florian Hartwig
94dc2f567a
Suppress explicit_counter_loop lint if loop variable is used after the loop
2015-11-26 00:09:01 +01:00
Florian Hartwig
9511e6739d
Update to latest rust nightly
2015-11-19 15:51:30 +01:00
Seo Sanghyeon
b17e38782e
Remove trailing commas in match arms with blocks
2015-11-17 13:39:42 +09:00
Florian Hartwig
5ca7ebb6d2
Fix false positives when iterator variable is used after the loop
2015-10-26 23:57:55 +01:00
Florian Hartwig
8626ac1fd4
Fixes for code review comments
...
* remove weird infinite loops from compile-tests
* remove call to Option::unwrap
* in the lint message, show while-let loop rewritten as for loop
2015-10-26 23:57:55 +01:00
Florian Hartwig
659e7c1d5e
Don't suggest using a for loop if the iterator is used in the loop body
...
Due to https://github.com/rust-lang/rust/issues/8372 , we have to use while-let
in these cases.
2015-10-26 23:57:55 +01:00
Florian Hartwig
f6163fce61
Suggest for loop instead of while-let when looping over iterators
2015-10-26 23:57:50 +01:00
Georg Brandl
a91c618fed
Fix reverse_range_loop not taking sign into account ( fixes #409 )
...
Adds a Display impl for Constant, because that might come in handy
elsewhere as well.
2015-10-26 08:05:01 +01:00
Andre Bogus
b3d035d252
Merge PR #374
2015-10-14 11:44:09 +02:00
Andre Bogus
bed29a017b
new lint to detect
2015-10-13 18:38:08 +05:30
Ravi Shankar
fb5fdb61fa
whup the while_let_loop for ignoring expressions!
2015-10-12 19:12:59 +05:30
Josh Stone
846602a876
Update the DefLocal pattern
...
DefLocal now contains a DefId too, since rust-lang/rust@a0dc2d9a29 .
2015-10-02 11:07:56 -07:00
Manish Goregaokar
431c391818
Fix a panic caused by while let
2015-10-02 13:37:41 +05:30
Manish Goregaokar
7eb0896271
Merge pull request #351 from Wafflespeanut/while_let
...
Training the `while_let` detector...
2015-10-01 01:14:45 +05:30
Ravi Shankar
185da55263
extending while_let to warn for more statements
2015-09-29 20:26:34 +05:30
Manish Goregaokar
15e3774cb4
rustup to 1.5.0-nightly (7bf4c885f 2015-09-26)
...
fixes #348
2015-09-28 10:34:10 +05:30
Pietro Monteiro
b2c66d1a0e
Upgrade Rust to rustc 1.5.0-nightly (b2f379cdc 2015-09-23)
...
Ident was removed in many HIR structures in favor of Name.
2015-09-23 17:30:39 -07:00