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
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
llogiq
21cd0c7e70
check for is_empty() method to get rid of false positives
2015-06-01 07:40:33 +02:00
Matthew Hall
423a9666ca
Implements #45 - any number mod 1 will be 0
2015-05-31 13:43:31 +01:00
llogiq
77838d6ba7
New lint for issue
...
#72
2015-05-30 15:10:19 +02:00
Matthew Hall
7e16822925
Add lint for ifs that could be collapsed
...
"Collapsible" ifs are ones which contain only a then block, and the then
block consists of an if that only has a then block.
2015-05-29 15:41:25 +01:00
llogiq
0d651c72ff
made macro test even simpler, added a few tests
2015-05-26 01:45:15 +02:00
llogiq
4292dc77a7
new lint: cmp_owned
2015-05-21 14:51:43 +02:00
llogiq
483a546e74
added messages to test error comments
2015-05-20 09:34:02 +02:00
llogiq
e8ca3c6eae
new lints len_zero and len_without_is_empty
2015-05-20 08:52:19 +02:00
llogiq
1f8453ab73
mut_mut now more robust (thanks to Manishearth, see issue #9 )
2015-05-18 10:41:15 +02:00
llogiq
96bfade4f1
New lint: mut_mut (closes issue #9 )
2015-05-18 09:02:24 +02:00
llogiq
edf747ab76
new lint: identity_op, refactored bit_masks a bit
2015-05-15 18:46:43 +02:00
llogiq
6bec4f35df
Added 'ineffective bit mask' lint
2015-05-15 14:09:29 +02:00
Manish Goregaokar
2447e1d5be
Add eta reduction ( fixes #29 )
2015-05-10 11:49:08 +05:30
llogiq
b24433f36d
added test for issue #31
2015-05-08 06:01:41 +02:00
llogiq
17bcf0e865
New lint: precedence, see issue #41
2015-05-06 12:59:08 +02:00
llogiq
ac151bb1f0
Added new 'float_cmp' lint (see issue #46 )
2015-05-06 10:01:49 +02:00
llogiq
0936e0617a
new lint to check for doomed comparisons to NAN
2015-05-04 14:11:15 +02:00
llogiq
2cb84b9d15
New lint: approx_const
2015-05-04 12:01:34 +02:00
llogiq
8d2328d9a5
Added &String matching and renamed to vec_ptr_arg to ptr_arg, also added README section
2015-05-04 08:15:24 +02:00
llogiq
07adeee6e9
Added check for zero bitmask and uncommon directions, wrong comment in needless_bool corrected, added new lint vec_ptr_arg + test
2015-05-04 07:20:34 +02:00
llogiq
53fa76dff9
new lint: needless_bool (TODO: The warnings could give more specific directions)
2015-05-02 00:35:49 +02:00
llogiq
3a9bf24bb3
Added constant lookup (with help from Manish) to bad_bit_mask
2015-04-30 15:17:06 +02:00
llogiq
441b55b328
Added eq_op and bad_bit_mask from the extra_lints project (mostly plain copy, need to refactor to integrate better)
2015-04-30 11:48:43 +02:00
Manish Goregaokar
a5c3102594
Use compiletest
2015-04-14 00:20:44 +05:30