Commit graph

158 commits

Author SHA1 Message Date
Pyriphlegethon 390168cc0f Well, fix them again 2015-09-30 18:17:55 +02:00
Pyriphlegethon c5ab8d62e3 Fix tests 2015-09-30 18:00:14 +02:00
Pyriphlegethon 52aee99f6d Add test for unnecessary mut passed lint 2015-09-30 13:28:23 +02:00
Georg Brandl e8f875813d all: remove trailing spaces 2015-09-28 07:11:03 +02:00
llogiq 4838e8a3b4 Merge pull request #344 from Manishearth/reflet
Handle let ref in toplevel_ref_arg as well
2015-09-22 09:18:45 +02:00
Manish Goregaokar 3609a2211a Handle let ref in toplevel_ref_arg as well 2015-09-22 12:46:51 +05:30
Georg Brandl 7cc291d02e generalize let_and_return for any block (closes #340) 2015-09-20 13:57:31 +02:00
Manish Goregaokar f4da7d09d2 Upgrade Rust to rustc 1.5.0-nightly (cff041170 2015-09-17)
LintPass was split and ExprParen was removed from the HIR

Fixes #338
2015-09-19 08:23:04 +05:30
llogiq acc83c0b02 Merge pull request #336 from Manishearth/issue335
ref matches: false positive with only wildcard pattern match
2015-09-17 07:43:26 +02:00
Georg Brandl e3ee87965e ref matches: false positive with only wildcard pattern match (fixes #335) 2015-09-17 07:25:08 +02:00
Manish Goregaokar 3124d2b8df Rustup to rustc 1.5.0-nightly (fc4d566b4 2015-09-16)
fixes #334
2015-09-17 05:32:29 +05:30
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
llogiq 0e1bc74683 additional macro check + more tests 2015-09-10 08:51:14 +02:00
llogiq 4835372df5 made shadow_unrelated allow, added previous binding span note, fixed #319 2015-09-08 11:50:04 +02:00
Manish Goregaokar 0e658afc1b Fix mut_mut false positive, make Allow (fixes #309) 2015-09-08 02:29:13 +05:30
Andre Bogus b76ad366ab fixed bad_bit_mask false positive 2015-09-06 16:09:35 +02: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
llogiq 79bf820170 added test against const lookup 2015-09-05 16:24:41 +02:00
llogiq cd91110ec0 new lint: min_max 2015-09-05 12:46:34 +02:00
Manish Goregaokar fb148a50b2 Add false positive checks to unicode test 2015-09-04 16:27:53 +05:30
llogiq e11fd49b1c Unicode lints, second attempt: Lint whole strings, help with replacement 2015-09-04 16:18:46 +05:30
Manish Goregaokar eca185438b Update rust to 0efb9dab8c7c07fa28e9df0eccc5c07ea3c17fbb (HIR+lints, Thu Sep 3 18:59:56 2015 +0530)
fixes #294
2015-09-03 23:12:19 +05:30
Manish Goregaokar 73c34e12b3 Only handle ranges starting with 0 for needless_range_loop (fixes #279) 2015-09-02 16:11:54 +05:30
llogiq 0c7f05dd76 check item name for eq, fixes #268 2015-09-02 10:30:11 +02:00
llogiq 0fb7d1d2d9 reporting improvements 2015-09-02 08:19:47 +02:00
Georg Brandl 5264196538 methods: try to allow value self when type is Copy (fixes #273) 2015-09-01 21:08:49 +02:00
Georg Brandl 1007864198 new lint: self conventions for certain method names (fixes #267) 2015-09-01 18:52:48 +02:00
Georg Brandl 88dd38de87 lib: add clippy_pedantic group with all Allow by default lints (fixes #265) 2015-09-01 18:05:28 +02:00
Manish Goregaokar d3da9f6c81 Merge branch 'pr-260'
Conflicts:
	src/lib.rs
2015-08-31 15:06:53 +05:30
Georg Brandl e33bef685e lifetimes lint: walk type bounds as well as types (fixes #253, again) 2015-08-31 11:26:41 +02:00
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 03abe275b2 new lint: unnecessary patterns (x@_ -> x) 2015-08-30 19:02:30 +02:00
Tim Neumann ef0c933550 add precedence_negative_literal lint 2015-08-30 17:34:48 +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 b72ef5a173 new lint: loop-match-break, which could be while-let (fixes #118) 2015-08-30 12:40:39 +02:00
Georg Brandl 6461fb3308 lifetimes lint: take "where" clauses into account (fixes #253)
If a where clause is present and has lifetimes mentioned, just bail out.
2015-08-30 09:58:26 +02:00
Manish Goregaokar 193e71be61 Merge branch 'pr-228'
Conflicts:
	README.md
	src/methods.rs
2015-08-27 11:09:40 +05:30
Georg Brandl bb552dc96f eta_reduction: fix false positive for unsafe fns (fixes #243) 2015-08-26 17:09:51 +02:00
llogiq 5e341715cd Merge pull request #240 from Manishearth/shadow_scope
correct scoping for shadow lints
2015-08-25 23:56:57 +02:00
llogiq 51a211503d correct scoping for shadow lints 2015-08-25 23:48:22 +02:00
Manish Goregaokar c9b849bdc8 Merge pull request #237 from birkenfeld/iter_fix
loops: use a whitelist for the "x.iter() -> &x" lint (fixes #236)
2015-08-26 03:16:49 +05:30
Manish Goregaokar 6df102cdab Merge pull request #238 from birkenfeld/to_string_fix
methods: suggest correct replacement for `to_string()` (fixes #232)
2015-08-26 02:43:19 +05:30
llogiq 56cdd58ad2 Merge branch 'master' of https://github.com/Manishearth/rust-clippy into shadow 2015-08-25 20:09:50 +02:00
Georg Brandl 6fa34cca29 methods: suggest correct replacement for to_string() (fixes #232) 2015-08-25 18:39:21 +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
llogiq 5225feceaa shadowing detection 2015-08-25 13:40:26 +02:00