mcarton
e6b905d925
Add a test for #398
2016-01-14 21:04:56 +01:00
mcarton
387e0991e3
Handle more iterator adapter cases in for loops
2016-01-14 20:58:32 +01:00
Devon Hollowood
98d21f9fc5
Make compatible with unused_variables
lint
2015-12-18 16:04:33 -08:00
Devon Hollowood
92fba6bd2c
Make clippy tests compatible with new lint
2015-12-12 21:39:10 -08: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
Manish Goregaokar
140c34f85e
Tests shouldn't be executable ( fixes #444 )
2015-11-09 08:49:20 +05:30
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
Pyriphlegethon
c5ab8d62e3
Fix tests
2015-09-30 18:00:14 +02:00
Nathan Weston
8a5b4f19fd
Check for mutable borrow of counter variable
2015-09-15 09:41:25 -04:00
Nathan Weston
f87dd31f30
New lint: loop with explicit counter variable ( fixes #159 )
...
Avoiding false positives here turns out to be fairly complicated.
2015-09-15 09:41:25 -04:00
llogiq
5c5d103405
added fp test against negative .step_by(_)
2015-09-15 09:12:58 +02:00
swgillespie
bc7d252856
use the constant folder to generalize the lint a little bit and clean up the code. Add additional tests for things that should not be linted
2015-09-14 22:20:56 -07:00
swgillespie
82c524b774
implement empty range lint as described in #330
2015-09-14 17:19:05 -07:00
inrustwetrust
efd553c8a9
Don't show the explicit_iter_loop lint for arrays with more than 32 elements
...
The IntoIterator trait is currently not implemented for arrays with more than
32 elements, so for longer arrays, the iter() or iter_mut() methods must be
used.
2015-09-06 13:36:21 +02:00
Manish Goregaokar
73c34e12b3
Only handle ranges starting with 0 for needless_range_loop ( fixes #279 )
2015-09-02 16:11:54 +05:30
Georg Brandl
0217fb81ee
loops: fix false positives with explicit_iter_loop and references ( fixes #261 )
2015-08-31 08:29:40 +02:00
Georg Brandl
16df79a054
new lint: using collect() to just exhaust an iterator
...
Should use a for loop instead.
2015-08-30 13:10:59 +02:00
Georg Brandl
ffed5b0b23
loops: use a whitelist for the "x.iter() -> &x" lint ( fixes #236 )
2015-08-25 18:28:05 +02:00
Georg Brandl
e9a41e2374
new lint: lint when iterating over any Iterator::next() result ( fixes #182 )
2015-08-17 07:28:40 +02:00
Georg Brandl
9578403638
new lint: looping over x.iter() or x.iter_mut() ( fixes #157 )
2015-08-13 16:31:16 +02:00
Georg Brandl
f6090909d3
new lint: using for i in 0..x { .. vec[i] .. }
instead of iterator ( fixes #3 )
2015-08-13 06:34:08 +02:00