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
This commit is contained in:
parent
8dfa02938d
commit
2c2716f045
22 changed files with 180 additions and 70 deletions
|
@ -12,10 +12,11 @@ use syntax::ast::*;
|
|||
use utils::{span_lint, walk_ptrs_ty, snippet};
|
||||
|
||||
declare_lint!(pub LEN_ZERO, Warn,
|
||||
"Warn when .is_empty() could be used instead of checking .len()");
|
||||
"checking `.len() == 0` or `.len() > 0` (or similar) when `.is_empty()` \
|
||||
could be used instead");
|
||||
|
||||
declare_lint!(pub LEN_WITHOUT_IS_EMPTY, Warn,
|
||||
"Warn on traits and impls that have .len() but not .is_empty()");
|
||||
"traits and impls that have `.len()` but not `.is_empty()`");
|
||||
|
||||
#[derive(Copy,Clone)]
|
||||
pub struct LenZero;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue