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
Georg Brandl
a67e55f3f0
lint messages: remove trailing period
...
Since lint messages often are suffixed by ", #[warn(xxx)] on by default"
this trailing period produces an ugly clash with the comma.
2015-08-13 08:15:42 +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
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
4350dab761
types: remove almost duplicate helper function
...
I guess "help" instead of "note" is fine as well, so we can
get rid of the extra function.
2015-08-11 21:25:51 +02:00
Manish Goregaokar
de5ccdfab6
Upgrade to rustc 1.3.0-nightly ( 4d52d7c85
2015-07-30)
2015-07-31 12:00:06 +05:30
Manish Goregaokar
0e8e8cfc9b
Basic framework for structured logging
2015-07-27 00:39:09 +05:30
Joshua Yanovski
11dea78595
Fix Box<Vec<T>> test.
2015-05-06 22:52:16 -07:00
Manish Goregaokar
2756ebe056
rustup
2015-04-14 00:12:51 +05:30
Manish Goregaokar
426a3ee1e7
Rustup
2015-03-02 16:13:44 +05:30
Manish Goregaokar
b7ecb6e7c7
rustup
2015-01-07 09:35:34 +05:30
Manish Goregaokar
e57396bc52
Remove namespacing
2014-12-26 05:24:44 +05:30
Manish Goregaokar
ccf996c348
clippy lint group
2014-12-26 05:12:05 +05:30
Manish Goregaokar
39481a521c
rustup (MatchSource rename, missing copy)
2014-12-26 04:35:12 +05:30
Manish Goregaokar
467b1ad9a4
rustup
2014-12-19 14:41:00 +05:30
Rohan Prinja
3a9fda7c7b
Path has only 2 fields now
...
See also: https://github.com/phildawes/racer/pull/72
2014-12-04 18:05:49 +05:30
Manish Goregaokar
7bb411c239
more clippylike (from issue title)
2014-11-20 12:38:27 +05:30
Manish Goregaokar
ca7ad5fa80
Add DList lint ( fixes #2 )
2014-11-20 12:37:37 +05:30
Manish Goregaokar
767bd168c1
moar clippylike
2014-11-19 14:34:18 +05:30
Manish Goregaokar
9341427b0a
docs
2014-11-19 14:32:47 +05:30
Manish Goregaokar
92f13d8231
boxvec
2014-11-19 14:27:34 +05:30