sinkuu
c9091b71a1
Don't lint when matching &&mut
by &ref
( Fix #1432 )
2017-01-11 00:42:58 +09:00
Oliver Schneider
e066997046
FOR_KV_MAP can now lint on mutable maps due to values_mut()
2017-01-10 08:33:20 +01:00
sinkuu
a2bcce9dbf
Move is_try
to util
...
Removed unnecessary condition
Also changed lint span of `try` from surrounded expression to entire `try`
invocation. It turned out that compiletest misses errors for macro invocations.
2017-01-07 23:52:48 +09:00
sinkuu
ce6e037ac5
Implement unused_io_amount
lint
2017-01-07 22:23:33 +09:00
Theemathas Chirananthavat
3050d90930
Add forget_ref tests.
...
Also rename drop_ref.rs to drop_forget_ref.rs in tests/compile-fail.
2017-01-05 17:41:01 -08:00
Theemathas Chirananthavat
920a2b7468
The drop_ref test does not require implementing the Drop trait.
2017-01-05 17:41:01 -08:00
Oliver Schneider
f145fc44f8
Merge pull request #1414 from samueltardieu/no-short-circuit-if
...
Add a new "short_circuit_statement" lint (fixes #1194 )
2017-01-05 10:41:14 +01:00
Manish Goregaokar
9a301fd508
Bump to 0.0.106; Fix false positive in wrong_self_convention ( fix #1420 )
2017-01-04 18:05:04 -08:00
Samuel Tardieu
82b2f5663f
Add a new "short_circuit_statement" lint ( fixes #1194 )
2016-12-31 01:17:39 +01:00
Manish Goregaokar
b8b54eb0d8
Fix suggestion span on new_without_default ( fixes #1407 )
2016-12-29 11:19:32 -08:00
Theemathas Chirananthavat
c0c20145d1
Fix compile-fail tests by allowing double_parens.
2016-12-28 12:04:46 -08:00
Theemathas Chirananthavat
e7352877c5
Add test for double_parens lint.
2016-12-28 11:21:53 -08:00
Martin Carton
96d2483b09
Merge pull request #1400 from oli-obk/needed_needless_lifetime
...
support impl trait for needless lifetimes
2016-12-25 18:24:39 +01:00
Martin Carton
7c480d0db7
Merge pull request #1394 from Manishearth/absurd_extreme_comparisons_false_positive
...
fix absurd extreme comparisons false positive
2016-12-25 17:47:42 +01:00
Oliver Schneider
93333f0d7b
support impl trait for needless lifetimes
2016-12-22 15:51:59 +01:00
Oliver Schneider
2f219b827e
fix an ice related to associated types
...
fixes #1341
2016-12-22 14:16:07 +01:00
Oliver Schneider
0b10a41ef3
fix absurd extreme comparisons false positive
...
fixes #1387
2016-12-21 16:49:53 +01:00
Oliver Schneider
7a1d85f1de
Merge branch 'master' into allow_deprecated
2016-12-21 15:47:12 +01:00
Oliver Schneider
00a3bfb8eb
Don’t warn for types used in trait implementation
2016-12-21 15:42:20 +01:00
Oliver Schneider
90fc9c389f
split pub_enum_variant_names to new lint
2016-12-21 13:30:57 +01:00
Oliver Schneider
009c6d95d7
manually fix the overlong lines
2016-12-21 12:30:41 +01:00
Oliver Schneider
0a7ae5fec8
run rustfmt
2016-12-20 10:20:41 +01:00
Manish Goregaokar
d61c7fc747
Merge pull request #1355 from philipturnbull/deref-addrof
...
Lint usage of `*&` and `*&mut`
2016-12-19 03:35:45 -08:00
Oliver Schneider
5aded99033
don't lint on x = x + y inside an AddAssign impl
...
fixes #1302
2016-12-19 11:13:07 +01:00
Oliver Schneider
2e63a5648a
uncomment code that was commented out for testing
2016-12-04 19:31:46 +01:00
mcarton
65ff2df7e7
Fix copy lints
2016-12-02 22:23:24 +01:00
mcarton
fe15880beb
Revert "down to for-loops not comparing as equal"
...
This reverts commit cf1fa94be1
.
2016-12-02 20:54:05 +01:00
mcarton
42fb11f887
Don't set RUST_BACKTRACE for tests
...
It is slow but it can be useful and can be set/unset explicitly before
running tests if needed. There is no backtrace by default anyway.
2016-12-02 20:33:37 +01:00
Oliver Schneider
cf1fa94be1
down to for-loops not comparing as equal
2016-12-02 19:19:52 +01:00
Oliver Schneider
16aab71688
enum glob use
and copies
left
2016-12-02 17:38:31 +01:00
Wim Looman
919feaaec5
Allow allow(deprecated)
attribute on use
items
...
fixes #1372
2016-12-01 22:36:35 +01:00
Phil Turnbull
0ee6128e27
Convert DEREF_ADDROF to EarlyLintPass
2016-11-25 10:33:21 -05:00
Phil Turnbull
8d04038c56
Make deref_addrof suggestions stricter
...
SUGGESTION matches a substring so 'aref' in the testcases can match
'let b = *aref', 'let b = **aref', 'let b = *&aref' etc, which are
all wrong.
2016-11-25 10:33:01 -05:00
mcarton
c35f82b823
Rustup to *rustc 1.15.0-nightly ( 7b3eeea22
2016-11-21)*
2016-11-23 21:31:55 +01:00
Phil Turnbull
a9f5b90f0f
Lint usage of *&
and *&mut
...
fixes #1316
2016-11-22 21:06:20 -05:00
Martin Carton
530083c3b9
Merge pull request #1349 from philipturnbull/extend-chars
...
Lint `.extend(s.chars())` (closes #792 )
2016-11-22 18:21:30 +01:00
Phil Turnbull
e9f3911899
Suggest &s
instead of s.as_str()
2016-11-20 11:19:36 -05:00
sinkuu
5d40965b50
Fix #1346
2016-11-20 10:15:40 +09:00
sinkuu
1973e94550
Allow explicit returns with cfg attributes
2016-11-20 10:02:41 +09:00
Phil Turnbull
73a73638c0
Add lint for string.extend(string.chars())
...
fixes #792
2016-11-19 14:55:47 -05:00
Phil Turnbull
fa78b09fa7
Add lint for string.extend("str".chars())
...
fixes #792
2016-11-19 14:55:02 -05:00
mcarton
7140eac484
Cleanup
2016-11-18 13:40:44 +01:00
mcarton
945c027768
Handle closure with single expression blocks
2016-11-17 19:44:18 +01:00
mcarton
19c5f5394b
Rustup to rustc 1.15.0-nightly ( 0ed951993
2016-11-14)
2016-11-16 23:05:26 +01:00
Oliver 'ker' Schneider
cfae1e9fda
fix ice in len_zero
lint when type has no inherent impls at all
...
fixes #1336
2016-11-10 17:06:39 +01:00
Oliver Schneider
a260e65ead
Merge pull request #1312 from devonhollowood/get-unwrap
...
Implement `get_unwrap` lint
2016-11-09 09:49:20 +01:00
Oliver Schneider
a56af73fd8
mark cyclomatic complexity attribute as used
...
fixes #1315
2016-11-02 10:29:57 +01:00
Devon Hollowood
6a14dc7fd4
Remove false positives from get_unwrap
lint
...
HashMap and BTreeMap don't implement `IndexMut`, so we shouldn't lint
for use of `get_mut().unwrap()` for those types.
2016-11-01 17:48:32 -07:00
Devon Hollowood
4e0d182d1d
Clean up get_unwrap
code
2016-11-01 17:48:18 -07:00
Devon Hollowood
1187d333ec
Add tests for get_unwrap
lint
2016-11-01 01:08:47 -07:00
Sebastian Ullrich
8664d03ec6
implement 'Re-implementing PartialEq::ne
' lint
...
closes #86
2016-10-30 15:00:59 -04:00
d-dorazio
d213040381
Add lint for redundant pattern matching in iflet for Result/Option
2016-10-30 15:43:46 +01:00
Devon Hollowood
3a0d342a33
Fix false positive for wrong_self_convention
2016-10-27 01:11:34 -07:00
mcarton
984e15a0c0
Forbid default warnings in dogfood
2016-10-22 16:16:55 +02:00
d-dorazio
62831c6e29
Suggest nth(X)
instead of skip(X).next()
2016-10-14 13:38:00 +02:00
mcarton
8d0431fd9a
Test for #1275
...
Close #1275 .
2016-10-12 12:00:26 +02:00
d-dorazio
a4d4a372e0
Avoid redundant multiple pattern suggested when one pattern is _
2016-10-08 16:29:19 +02:00
mcarton
47c2271497
Fix FP with print_with_newline
and final arguments
2016-10-06 22:30:03 +02:00
Martin Carton
e851bc7404
Merge pull request #1257 from KitFreddura/master
...
If let some lint
2016-10-04 23:00:05 +02:00
Manish Goregaokar
7b94ef19bd
aux -> auxiliary (breaks Windows)
2016-10-04 09:15:03 +05:30
Manish Goregaokar
a4198c1108
Merge pull request #1255 from Manishearth/cov
...
Improve test coverage
2016-10-03 22:15:23 +05:30
mcarton
6800111c8e
Move all *.toml
test files to tests/aux
2016-10-03 17:49:41 +02:00
Kit Freddura
72a653d8d4
readded files
2016-10-02 13:49:29 -07:00
mcarton
7b92fe0387
Test configuration file typing errors
2016-10-02 14:46:46 +02:00
mcarton
019e310861
Add more tests for bad configuration file
2016-10-02 14:43:09 +02:00
mcarton
f6f4af6adc
Add missing tests for ...
and array indexing
2016-10-02 14:42:55 +02:00
mcarton
e50cfa7e77
Add a test for a shadow
corner case
2016-10-02 02:38:54 +02:00
mcarton
9a3f53dee6
Partially hash let
declaration in SpanlessHash
...
The hash never needs to be good but before it was simply doing nothing
for these.
2016-10-02 02:17:04 +02:00
mcarton
6302e41ccb
Improve test coverage of hir
comparison
2016-10-01 22:27:25 +02:00
Martin Carton
8babb2d409
Merge pull request #1250 from elliottneilclark/explicit_into_iter
...
Add a lint to warn about un-necessary .into_iter()
2016-10-01 15:01:43 +02:00
Oliver Schneider
9c5d3f3b85
correctly traverse match expressions for diverging_sub_expr
2016-10-01 14:41:20 +02:00
Elliott Clark
5fa004313b
Add a lint to warn about un-necessary .into_iter()
...
This should close #1094 .
2016-09-30 17:42:43 -07:00
mcarton
84269478b0
chmod -x tests/compile-fail/print_with_newline.rs
2016-10-01 00:50:40 +02:00
Martin Carton
fe27ac5fd2
Merge pull request #1237 from Manishearth/rustup
...
Rustup to *rustc 1.13.0-nightly (d0623cf7b
2016-09-26)* and bump to 0.0.91
2016-09-28 01:15:33 +02:00
mcarton
4f3920307a
Rustup to *rustc 1.13.0-nightly ( d0623cf7b
2016-09-26)*
2016-09-28 01:09:11 +02:00
mcarton
056b0c1cf2
Remove redundant labels in tests
2016-09-23 19:51:47 +02:00
Manish Goregaokar
fc9f2b99c7
Merge pull request #1235 from Manishearth/transmute_ptr_to_ref-suggs
...
Fix wrong suggestion in `TRANSMUTE_PTR_TO_REF` with lts
2016-09-19 22:02:47 +05:30
mcarton
f74dcaac0c
Fix wrong suggestion in TRANSMUTE_PTR_TO_REF
with lts
2016-09-19 17:59:12 +02:00
Oliver Schneider
c89c5d21c1
Merge remote-tracking branch 'origin/master' into examples
2016-09-19 15:38:38 +02:00
mcarton
c8986b4676
Fix FP with WHILE_LET_ON_ITERATOR
and refutable pats
2016-09-16 15:50:35 +02:00
Martin Carton
dc84759ac5
Merge pull request #1224 from oli-obk/divergence
...
lint diverging expressions that are sub-expressions of others
2016-09-13 15:58:31 +02:00
Oliver Schneider
9427a4ae80
also test match statements, return, continue and break
2016-09-13 14:52:21 +02:00
Oliver Schneider
e6bfe4b514
also lint diverging methods
2016-09-13 12:41:37 +02:00
Oliver Schneider
a2257280ec
don't lint expressions referencing !
objects, just expressions creating them
2016-09-13 12:41:20 +02:00
Oliver Schneider
40ce3a8f1c
add tests for stutter lints
2016-09-13 10:20:10 +02:00
Oliver Schneider
12a82b2007
also lint private modules for module_inception, as that is the main issue
2016-09-13 10:19:55 +02:00
Oliver Schneider
f469860dc2
lint diverging expressions that are sub-expressions of others
2016-09-12 14:24:11 +02:00
Oliver Schneider
03fa974855
Let the submodule #[allow]
in module_inception
2016-09-12 10:30:42 +02:00
mcarton
8216036193
Add test for #[allow(module_inception)]
on the inner module
2016-09-12 10:11:48 +02:00
mcarton
b08c7aa553
Remove EOL space
2016-09-09 20:24:15 +02:00
mcarton
b82f43f38e
Revert "Remove all union
stuffs"
...
This reverts commit 888c34ad70
.
This rustups to rustc 1.13.0-nightly (70598e04f
2016-09-03).
2016-09-04 17:45:36 +02:00
mcarton
b2de244cfd
Restrict len_without_is_empty
to exported items
2016-09-02 15:30:06 +02:00
kennytm
5f09020e90
Added a lint_without_lint_pass lint.
...
Four lints were missing from LintPass, making them unavailable unless the
`clippy` lint group is explicitly enabled:
* `for_loop_over_result`
* `for_loop_over_option`
* `match_overlapping_arm`
* `filter_next`
2016-09-01 15:07:37 +08:00
mcarton
888c34ad70
Remove all union
stuffs
...
The rustc's PR wasn't merged. Hopefully this commit can simply be reverted when it's time.
2016-08-31 18:22:36 +02:00
mcarton
01424f5622
Support unions here and there
2016-08-31 18:22:36 +02:00
mcarton
ee3f3bf260
Remove temporary fix now unneeded
2016-08-31 18:22:36 +02:00
mcarton
d87f137254
Add a builtin_type_shadow
lint
2016-08-28 19:56:18 +02:00
mcarton
e922fa80ce
Fix FP in ZERO_PREFIXED_LITERAL
and 0b
/Oo
2016-08-28 18:00:09 +02:00
mcarton
36d8ca04a1
Add a MISSING_DOCS_IN_PRIVATE_ITEMS
lint
2016-08-23 18:28:39 +02:00
mcarton
507b626b36
Add zero_prefixed_literal
lint
2016-08-23 18:15:12 +02:00