Commit Graph

646 Commits

Author SHA1 Message Date
llogiq
1555eed5fb Merge pull request #452 from fhartwig/lifetime-false-positives
Fix some false positive in needless_lifetimes lint
2015-11-14 09:25:19 +01:00
Manish Goregaokar
9881f1b49d Merge pull request #454 from apasel422/issue-446
Match `min` and `max` functions using `DefId`
2015-11-11 21:48:33 +05:30
Andrew Paseltiner
91763d7725 Match min and max functions using DefId
Closes #446.
2015-11-11 11:08:33 -05:00
Manish Goregaokar
c8509a0799 Merge pull request #453 from apasel422/transmute
Add lint for useless transmutes
2015-11-11 21:26:14 +05:30
Andrew Paseltiner
e8a239a1a2 Add lint for useless transmutes
Closes #441.
2015-11-11 10:53:11 -05:00
Florian Hartwig
6046edbc23 Add some tests for lifetime elision lint with types and traits with lifetimes 2015-11-11 00:26:22 +01:00
Florian Hartwig
e48973eb9f Track elided lifetimes in types and trait objects 2015-11-11 00:12:45 +01:00
Manish Goregaokar
d57fa7bc5b Merge pull request #450 from Manishearth/mir_float_cmp
use rustc's eval_const, bail on (negative) infinity
2015-11-10 21:19:47 +05:30
Andre Bogus
42ae1e6918 use rustc's eval_const, bail on (negative) infinity 2015-11-10 11:23:47 +01:00
llogiq
f3a66c0f28 Merge pull request #449 from Manishearth/shadow_visitor
use visitor for contains_self
2015-11-10 10:39:28 +01:00
Andre Bogus
aea2eb7da7 use visitor for contains_self 2015-11-10 10:25:21 +01:00
llogiq
12d1d6f9e8 Merge pull request #447 from apasel422/executable
Remove executable permission from remaining source files
2015-11-09 14:09:24 +01:00
Andrew Paseltiner
2801c1031d Remove executable permission from remaining source files 2015-11-09 08:04:41 -05:00
Manish Goregaokar
1a90bbff72 Merge branch 'pr-445' 2015-11-09 12:16:03 +05:30
Emanuel Czirai
44b2b26446 update readme to specify both lint groups are needed for the whole set
As a new user and newbie to rust, after reading this part of the readme("whole set"), I thought I was seeing a bug when I used `#![deny(clippy)]` but also had to add `#![deny(shadow_unrelated)]`.
But this explained it: 3322ffa8a0/src/lib.rs (L108)
2015-11-09 06:49:44 +01:00
Manish Goregaokar
140c34f85e Tests shouldn't be executable (fixes #444) 2015-11-09 08:49:20 +05:30
Manish Goregaokar
764791b83e Merge pull request #440 from Manishearth/map_clone
match .map(Clone::clone)
2015-11-08 10:13:55 +05:30
llogiq
a0cd8fc943 match .map(Clone::clone) 2015-11-05 17:11:41 +01:00
Manish Goregaokar
c7df4bd000 Rustup to rustc 1.6.0-nightly (effcd2965 2015-11-04)
fixes #437
2015-11-05 08:20:28 +05:30
llogiq
729b2daf27 Merge pull request #435 from sanxiyn/temporary-assignment
New lint for assignment to temporary
2015-11-04 14:20:04 +01:00
Seo Sanghyeon
3322ffa8a0 New lint for assignment to temporary 2015-11-04 21:37:18 +09:00
llogiq
364bdc5b70 Merge pull request #427 from wartman4404/master
Prefer `.cloned()` over `.map(|x| x.clone())`
2015-11-04 06:41:33 +01:00
wartman4404
764eedd050 check for Deref conversions 2015-11-03 21:11:40 -06:00
wartman4404
414c0d20f7 New lint for using .cloned() 2015-11-03 21:01:52 -06:00
llogiq
4b1409684a Merge pull request #432 from nweston/zip-with-range
New lint for zip with array length instead of enumerate()
2015-11-03 22:45:52 +01:00
Nathan Weston
d28b8e169f New lint for zip with array length instead of enumerate()
Fixes #11.
2015-11-03 15:55:20 -05:00
llogiq
cb729e1c6b Merge pull request #426 from Manishearth/fix-ptr-arg
Fix ptr-arg false positive for trait impls
2015-10-31 02:07:20 +01:00
Manish Goregaokar
dbb8a872a3 Fix ptr-arg false positive for trait impls
Fixes #425
2015-10-31 05:18:05 +05:30
llogiq
555328cc7b Merge pull request #422 from sanxiyn/no-effect
New lint for statement with no effect
2015-10-29 12:05:28 +01:00
Seo Sanghyeon
0fe5981870 New lint for statement with no effect 2015-10-29 15:50:35 +09:00
Manish Goregaokar
be2b1da3ef Merge pull request #423 from wartman4404/master
Duplicate warnings for match_bool / single_match #403
2015-10-29 09:02:56 +05:30
wartman4404
8e4c2171d2 Don't show single_match if match_bool also applies 2015-10-28 22:26:48 -05:00
llogiq
aee42f70f3 Merge pull request #396 from fhartwig/while-let-for
Suggest for loop instead of while-let when looping over iterators
2015-10-27 18:33:58 +01:00
Florian Hartwig
c5b6fda399 Allow needless_lifetime to pass dogfood.sh 2015-10-27 18:28:36 +01: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
66419582b5 Fix error in README 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
3fe6ca9def Merge pull request #415 from birkenfeld/fix_409
Fix reverse_range_loop not taking sign into account (fixes #409)
2015-10-26 08:07:24 +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
Manish Goregaokar
2b65473ac5 fix 2015-10-25 23:49:57 +05:30
Manish Goregaokar
5d3f627f47 bump version, add optional dep info 2015-10-25 23:43:27 +05:30
llogiq
d0a4d19fe3 Merge pull request #413 from iKevinY/approx-const
Compare float literals to stringified constants
2015-10-25 10:35:29 +01:00
Kevin Yap
70e3277bf9 Compare float literals to stringified constants
- Convert constants to strings and compare directly with float literal.
- Return immediately after positive match for constant.
- Fix value of `my_log10_e` in `approx_const` tests.
2015-10-24 16:00:22 -07:00
Manish Goregaokar
8c3a947b5e Merge pull request #408 from iKevinY/approx-const
Change implementation of approx_const lint
2015-10-23 17:38:10 +05:30
Kevin Yap
546eb14b7e Change implementation of approx_const lint
- Replace epsilon with lower and upper bounds for each constant.
- Warn on use of "3.14", and update tests accordingly.
2015-10-22 23:07:27 -07:00
Manish Goregaokar
a927bc0b70 Merge pull request #405 from sanxiyn/needless-update
New lint for struct update that has no effect
2015-10-22 14:53:54 +05:30
Seo Sanghyeon
d843257643 New lint for struct update that has no effect 2015-10-22 18:19:06 +09:00
Manish Goregaokar
1555a9f8af Merge pull request #402 from Manishearth/match_bool_hints
added code snippet help to match_bool
2015-10-21 12:04:00 +05:30