Georg Brandl
e9a41e2374
new lint: lint when iterating over any Iterator::next() result ( fixes #182 )
2015-08-17 07:28:40 +02:00
llogiq
c4b07ead17
Merge pull request #179 from nweston/step-by-zero
...
New lint: Range::step_by(0) (fixes #95 )
2015-08-16 20:12:52 +02:00
Nathan Weston
23a38c4170
New lint: Range::step_by(0) ( fixes #95 )
...
Uses type information so it can detect non-literal ranges as well
(Range or RangeFrom -- the other range types don't have step_by).
2015-08-16 12:58:54 -04:00
Manish Goregaokar
164907ece2
restrict toplevel_ref_arg to only functions ( fixes #170 )
2015-08-16 17:24:03 +05:30
Manish Goregaokar
f494f14aa6
Merge pull request #177 from birkenfeld/if_let_mini_fix
...
misc: fix check for unit body in "match -> if let" lint (fixes #172 )
2015-08-15 14:12:34 +05:30
Georg Brandl
542bf8d50e
misc: fix check for unit body in "match -> if let" lint ( fixes #172 )
2015-08-15 09:56:15 +02:00
Georg Brandl
b299433de3
lifetimes: fix case with one unnamed and one static ref ( fixes #171 )
2015-08-15 09:36:07 +02:00
llogiq
5d99ebec72
fixed false positives (at the cost of some false negatives)
2015-08-14 14:37:12 +02:00
llogiq
ffda91a8c7
removed String::from_str(..) to fix build with 1.4.0-nightly/2015-08-14
2015-08-14 14:26:57 +02:00
llogiq
dece5a6cb5
added empty line test
2015-08-13 23:18:34 +05:30
llogiq
f4b5d21533
added a few unit tests to trim_multiline
2015-08-13 23:18:34 +05:30
Manish Goregaokar
847070e19d
Merge pull request #151 from birkenfeld/needless_bool_msg
...
spelling fix, rework needless_bool with snippet (fixes #150 )
2015-08-13 23:17:18 +05:30
Manish Goregaokar
3cf5c36296
Address review comments, move to travis
2015-08-13 21:45:50 +05:30
Georg Brandl
49e51fe65a
lifetimes: try to fix w.r.t. lifetimes from parent scopes ( fixes #162 )
2015-08-13 21:45:42 +05:30
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
8a98736f51
spelling fix, rework needless_bool with snippet ( fixes #150 )
2015-08-13 15:31:16 +02:00
Andre Bogus
f67175b4cd
fixed error messages in compile-fail test
2015-08-13 11:38:39 +02:00
llogiq
f9e851e212
pulled strings passes together, added more tests
2015-08-13 11:36:39 +02:00
llogiq
0b08e9e83e
added string_add lint and fixed string_add_assign + test
2015-08-13 11:36:39 +02:00
Manish Goregaokar
8dfa02938d
Merge branch 'pr-149'
2015-08-13 13:00:29 +05:30
Manish Goregaokar
510ea0c5e5
Merge branch 'pr-140'
...
Conflicts:
src/lib.rs
2015-08-13 12:52:14 +05:30
Georg Brandl
7aee04878f
tests: use fragment of lint text for error checking
...
(Did not touch strings.rs, which is fixed by @llogiq's PR)
2015-08-13 08:12:07 +02:00
Georg Brandl
5952a29543
lifetimes test: use explicit message prefix
2015-08-13 07:51:24 +02:00
Georg Brandl
2f7693094f
lifetimes lint: include support for lifetimes as generic params
2015-08-13 06:43:25 +02:00
Georg Brandl
b349f9e88d
new lint for needless lifetimes ( fixes #115 )
2015-08-13 06:35:40 +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
Georg Brandl
3044d3d633
unicode: add lint against non-ascii chars in literals (Allow by default), #85
2015-08-12 20:36:35 +02:00
Manish Goregaokar
c58f803511
Merge branch 'pr-138'
...
Conflicts:
src/lib.rs
2015-08-12 21:22:01 +05:30
Georg Brandl
4074c1f968
methods: lint against String.to_string ( fixes #100 )
2015-08-12 17:03:13 +02:00
Georg Brandl
e8fed074cf
new lint: warn if let-binding has unit value ( fixes #74 )
2015-08-12 13:21:07 +02:00
Georg Brandl
b831bd1d1d
len_zero: display full suggested expr in message
2015-08-12 10:53:14 +02:00
Georg Brandl
bcd95aec1c
all: make style of lint messages consistent
...
* start first sentence lowercased
* use backticks to delimit code snippets
* use "this is wrong. Consider doing X." consistently
2015-08-12 10:47:09 +02:00
Georg Brandl
f6dc48fe3a
new lint for "let x = EXPR; x" at the end of functions ( fixes #104 )
2015-08-11 22:25:47 +02:00
Georg Brandl
2bcc151888
new lint for Option.unwrap() and Result.unwrap()
...
The latter is set to Allow by default (fixes #24 )
2015-08-11 21:19:11 +02:00
Manish Goregaokar
6bc69fa342
Merge pull request #127 from birkenfeld/better-helptext-if-let
...
better help text for "match -> if let" lint
2015-08-12 00:44:51 +05:30
Georg Brandl
e318328d63
all: whitespace cleanup
...
* 4-space indentation
* no trailing whitespace
* no tabs
2015-08-11 20:22:50 +02:00
Manish Goregaokar
2cb26126d3
Merge branch 'pr-78'
...
Conflicts:
src/lib.rs
2015-08-11 23:28:06 +05:30
Georg Brandl
cab9905705
better help text for "match -> if let" lint
...
Implements the suggestion from #87 .
Changes span_help_and_lint(), which is only used for this lint,
to use fileline_help() instead of span_help() to avoid printing
the span twice.
Also adds complete suggested new code. I had to distinguish
between blocks, which need no additionals braces, and other exprs.
2015-08-11 19:26:51 +02:00
Georg Brandl
0ff476b529
new lint for unneeded return stmts
2015-08-11 19:05:11 +02:00
llogiq
f0eb36c2af
added parent method, also changed match-if-let note to help
2015-08-11 15:07:21 +02:00
llogiq
b393752814
New string_add_assign lint (first part of #121 ), also formatting & refactoring
2015-08-05 15:10:45 +02:00
llogiq
0e5b62c8d8
also included String::from in cmp_owned and fixed deprecation in test
2015-06-11 16:53:23 +02:00
llogiq
23caf3cccc
first unicode lint: zero_width_space
2015-06-11 11:35:00 +02:00
llogiq
1f74c4b359
removed false positives from inline_always (issue #84 )
2015-06-07 12:03:56 +02:00
llogiq
8563ee60ec
fixed issue #88 in bit_mask
2015-06-06 02:27:48 +02:00
llogiq
b44435ef28
extended compile-test.rs to actually observe TESTNAME environment variable and filter tests if available
2015-06-06 02:07:48 +02:00
llogiq
1ee2e4ffe8
Fixed block check, also added macro test to collapsible_if and inline_always
2015-06-01 15:09:17 +02:00
llogiq
7f5891184d
merged upstream master
2015-06-01 13:55:55 +02:00
llogiq
cdca2c93c1
now the method lookup actually works (and I understand why! 😄 ), reduces unnecessary loops, and has a few comments
2015-06-01 12:49:36 +02:00
llogiq
4c76465154
Merge pull request #68 from Manishearth/macro_expn
...
macro expn detection in mut_mut.rs
2015-06-01 07:44:27 +02:00