Commit graph

623 commits

Author SHA1 Message Date
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
Andre Bogus
da82e2d3ba added code snippet help to match_bool 2015-10-21 08:24:56 +02:00
Manish Goregaokar
8fdeaa704c Merge pull request #401 from kvikas/match_bool
Match on bool should be replaced with if..else block
2015-10-21 01:00:39 +05:30
Vikas Kumar
5e78fbbf57 Fixups from review comments
1. Moved common check `in_external_macro` to the top of function from inside each
conditionals.
2. Inlined `is_bool_expr` call
2015-10-20 11:26:54 -07:00
Vikas Kumar
675c532eab Ran util/update_lints.py to auto gen doc and lib.rs 2015-10-20 10:25:37 -07:00
Vikas Kumar
2951b70d15 Match on bool should be replaced with if..else block
1. Added another conditional in `check_expr` impl to lint if match expr
is a bool.
2. Test cases.
2015-10-20 10:18:48 -07:00
Manish Goregaokar
dea087dd17 Merge branch 'pr-394' 2015-10-18 00:54:03 +05:30
Florian Gilcher
8063916477 Cleanup as discussed in PR 2015-10-17 20:16:54 +02:00
Manish Goregaokar
853368c1d3 Make is_from_for_desugar sound (rust/28973 got fixed) 2015-10-17 04:33:05 +05:30
Florian Gilcher
39e93d572b Regnerate README.md 2015-10-15 21:33:47 +02:00
Florian Gilcher
1bd023d3e0 New lint for needless use of nightly features 2015-10-15 21:33:47 +02:00
Manish Goregaokar
e24d469849 bump again 2015-10-15 19:56:27 +05:30
Manish Goregaokar
b2f4550654 Fix type complexity lint 2015-10-15 19:55:14 +05:30
llogiq
a7270adbd7 Merge pull request #395 from Manishearth/rustup
rustup
2015-10-15 16:24:04 +02:00
Andre Bogus
33062bb620 Merge branch 'master' of https://github.com/Manishearth/rust-clippy into rustup 2015-10-15 16:19:08 +02:00
Andre Bogus
be66322886 workaround for failing test 2015-10-15 16:18:40 +02:00
Andre Bogus
7db7559fa5 bump crate version 2015-10-15 16:04:19 +02:00
Andre Bogus
657afc1157 rustup 2015-10-15 16:02:19 +02:00
Manish Goregaokar
1f4136dc08 bump crates 2015-10-15 19:22:36 +05:30
llogiq
c0fab652f1 Merge pull request #392 from fhartwig/warn-ptr-args
Make ptr_arg lint warn by default
2015-10-14 22:40:18 +02:00
Florian Hartwig
871d9fc27c Make ptr_arg lint warn by default 2015-10-14 20:35:44 +02:00
Andre Bogus
cf1e83b6dc Merged #365 2015-10-14 12:22:57 +02:00
Andre Bogus
949c3545ce Merged #366 2015-10-14 12:06:28 +02:00
Andre Bogus
b3d035d252 Merge PR #374 2015-10-14 11:44:09 +02:00