Florian Hartwig
cee96fab39
Point out that char is 32 bit value
2016-01-27 21:10:35 +01:00
Florian Hartwig
04f9d35f64
Add a lint for casts from char literals to u8
2016-01-27 20:23:59 +01:00
Florian Hartwig
6a4d77aa32
Fix deprecation warning on latest nightly
2016-01-19 13:53:49 +01:00
Manish Goregaokar
c9342d0121
fmt clippy
2016-01-04 09:56:12 +05:30
Manish Goregaokar
d8d3ee907b
Add macro check for box vec ( fixes #529 )
2016-01-02 21:49:53 +05:30
Johannes Linke
06f30a61dd
Add "warn/allow by default" to lint descriptions where it was missing.
2016-01-01 17:48:19 +01:00
Cesar Eduardo Barros
8e59be318c
Mention VecDeque in linkedlist lint
...
I couldn't find anything named RingBuf in the standard library. Some
search revealed that it had been renamed to VecDeque before the first
stable Rust release.
2015-12-12 20:05:06 -02:00
llogiq
5bbc1427fd
added wiki comments + wiki-generating python script
2015-12-11 01:22:27 +01:00
Florian Hartwig
9511e6739d
Update to latest rust nightly
2015-11-19 15:51:30 +01:00
Seo Sanghyeon
b17e38782e
Remove trailing commas in match arms with blocks
2015-11-17 13:39:42 +09:00
Manish Goregaokar
b2f4550654
Fix type complexity lint
2015-10-15 19:55:14 +05:30
Andre Bogus
657afc1157
rustup
2015-10-15 16:02:19 +02:00
Manish Goregaokar
4e2b09831b
Rust upgrade to rustc 1.5.0-nightly ( 9d3e79ad3
2015-10-10)
2015-10-12 02:42:59 +05:30
Georg Brandl
85ac834343
RingBuf was renamed to VecDeque ( fixes #363 )
2015-10-05 22:02:14 +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
Manish Goregaokar
3124d2b8df
Rustup to rustc 1.5.0-nightly ( fc4d566b4
2015-09-16)
...
fixes #334
2015-09-17 05:32:29 +05:30
llogiq
0e1bc74683
additional macro check + more tests
2015-09-10 08:51:14 +02:00
Andre Bogus
391a5135e8
fixed build
2015-09-06 19:44:54 +02:00
Andre Bogus
0c74304f7b
macro check for unit_cmp
2015-09-06 19:41:09 +02:00
Andre Bogus
54393f0ef5
More strict macro check
2015-09-06 10:53:55 +02:00
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
Georg Brandl
846c164709
don't say "did you mean to" - use the standard "consider..."
...
"Did you mean to ..." sounds a bit condescending to me, since
if I meant to write "if let" I probably wouldn't have written "match" :)
2015-09-02 16:46:14 +02:00
Manish Goregaokar
c3d4eb5bbd
Merge branch 'pr-228'
...
Conflicts:
README.md
src/methods.rs
2015-08-27 15:25:56 +02:00
Manish Goregaokar
9ebcd0bf29
More macro checks
2015-08-27 04:33:59 +05:30
llogiq
6984d2bc09
added helpful links to lints that have wiki entries
2015-08-26 14:33:51 +02:00
Georg Brandl
92a3394065
all: remove unneeded deref and/or ref operations
2015-08-25 14:41:35 +02:00
R.Chavignat
3af2e3ba85
Refactored CastPass.
2015-08-23 06:26:31 +02:00
R.Chavignat
e80f2470b7
Merge branch 'master' into cast_iusize_improvements
2015-08-23 00:08:16 +02:00
R.Chavignat
79ef13592e
Completed the implementation of *size handling.
...
Added some more cases to the test, and implemented a new lint,
cast_possible_wrap, triggered when casting from an unsigned type to a
signed type of the same size.
2015-08-22 23:49:03 +02:00
llogiq
5a5b1ba96b
Merge pull request #216 from birkenfeld/match_pass
...
new lint: using &Ref patterns instead of matching on *expr (fixes #187 )
2015-08-22 19:06:48 +02:00
Georg Brandl
8f1a237493
&-matches: dogfood fixes!
2015-08-22 14:34:39 +02:00
Georg Brandl
1587256dc4
types: check for macros in type complexity check
2015-08-22 14:30:53 +02:00
Georg Brandl
630bb76f96
new lint: type complexity ( fixes #93 )
...
Still very naive, but it's a start.
2015-08-22 08:57:11 +02:00
R.Chavignat
f1255d5f5d
Casts : work in progress handling *size separately
2015-08-22 02:46:22 +02:00
Georg Brandl
8a10440641
utils: add match_type() helper function
...
which saves one level of matching when checking for type paths
2015-08-21 19:24:38 +02:00
Georg Brandl
a437936d49
all: put often used DefPaths into utils as consts
...
Also remove the "use xxx;" blocks to ensure import paths don't change.
They don't work anyway since stuff may still be re-exported at the old
location, while we need the "canonical" location for the type checks.
Plus, the test suite catches all these cases.
2015-08-21 19:23:05 +02:00
Georg Brandl
707e95f2e5
types: use middle::ty types instead of ast types
...
This gets rid of the match_ty_unwrap function.
2015-08-21 19:21:19 +02:00
R.Chavignat
ad0bc66402
Added support for isize/usize in the CastPass lint pass.
...
Extracted the match that determines an integer types's size in a
utility function and implemented support for usize/isize.
Added a needed feature to the crate root.
Added some tests to cover those cases, and a test I previously forgot.
Silenced two errors signaled by dogfood.sh in unicode.rs.
2015-08-21 03:03:37 +02:00
R.Chavignat
dbc9b7f46e
Reworked the error messages for more heplfulness.
...
Renamed the cast_possible_overflow lint to cast_possible_truncation,
and updated the error message, readme and crate root accordingly.
Added some more information to the message for the cast_precision_loss
lint.
Updated the test case to reflect changes.
2015-08-20 22:44:40 +02:00
R.Chavignat
ab481e5cb1
Refactored the CastPass lints.
2015-08-20 21:37:37 +02:00
R.Chavignat
ff28dd324e
Fixed a little oversight.
2015-08-20 14:50:26 +02:00
R.Chavignat
14528d433a
Simplified reexported ast::* type paths.
...
Also removed trailing whitespaces.
2015-08-20 14:46:40 +02:00
R.Chavignat
b417f01ed8
Also test that the CastExpr's right arm is numeric.
2015-08-20 14:36:26 +02:00
R.Chavignat
1846581baa
Added examples to lint descriptions.
2015-08-20 14:24:26 +02:00
R.Chavignat
993239d33a
Initial implementation of lossy cast lints.
...
Introduces 3 lints :
cast_possible_overflow
cast_precision_loss
cast_sign_loss
Add a compile-test test case.
Fix errors spotted by dogfood script.
2015-08-20 01:04:06 +02:00
Georg Brandl
8f4499f3ae
new lint: comparing unit types ( fixes #201 )
2015-08-19 08:11:00 +02:00
Georg Brandl
64954283c1
add some imports to guard against crate moves
2015-08-16 09:03:06 +02:00
Georg Brandl
47b605304d
all: organize imports
...
* remove unused imports
* separate external and internal imports
* consistent import of rustc::lint
* move #[allow(unused_imports)] to local impl
2015-08-16 08:55:34 +02:00
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
2c2716f045
all: DRY for lint descriptions
...
* use the rustc style for lint descriptions
* add a script to parse all lint descriptions
and put the generated table into README
2015-08-13 11:14:05 +02:00