Oliver Schneider
bf227f4729
split clippy into lints, plugin and cargo-clippy
2016-05-27 13:03:58 +02:00
mcarton
a9bea1f52b
Rustup to *1.10.0-nightly (22ac88f1a 2016-05-11)*
2016-05-12 21:22:38 +02:00
Oliver Schneider
6edc6a13d4
needless borrows found in clippy
2016-05-09 13:07:55 +02:00
Oliver 'ker' Schneider
bf4221c51a
cc: early returns are special
2016-04-23 14:30:05 +02:00
mcarton
a878916ad5
rustfmt all the things
2016-04-14 20:14:03 +02:00
mcarton
831b8fc1b5
Ignore #[test]
fns in cyclomatic_complexity
2016-04-14 17:26:07 +02:00
mcarton
c24ba91123
Rustup to 1.9.0-nightly (bf5da36f1 2016-04-06)
2016-04-08 02:23:14 +02:00
mcarton
f46e96405f
Rustup to 1.9.0-nightly (5ab11d72c 2016-04-02)
2016-04-03 17:22:10 +02:00
josephDunne
aa819b7748
Update rust-clippy to rustc 1.9.0-nightly (d5a91e695 2016-03-26)
...
move cfg, infer, traits and ty from middle to top-level
move middle::subst into middle::ty
track the extern-crate def-id rather than path (rustc ab9b844)
2016-03-27 20:24:10 +01:00
Oliver Schneider
d5a01e8789
prevent cc lint from panicking on unreachable code
2016-03-14 17:24:55 +01:00
mcarton
c6316df19f
Rustup to 1.9.0-nightly (c9629d61c 2016-03-10)
2016-03-11 14:18:56 +01:00
Oliver Schneider
bf20b40664
fix cyclomatic complexity lint triggering because of short circuit operations
2016-03-08 15:10:02 +01:00
Oliver Schneider
e7fa117ff8
simplify cyclomatic complexity auxiliarly value computation
...
previously the HIR was unnecessarily traversed twice
2016-03-04 16:27:03 +01:00
mcarton
c7bf068121
s/ctxt/TyCtxt
2016-03-04 14:25:34 +01:00
mcarton
b753e77cbe
Rustfmt and sort all use
items
2016-02-24 17:38:57 +01:00
Manish Goregaokar
f53a830c8c
Merge pull request #623 from mcarton/redundant
...
Be more consistent in lint declarations
2016-02-06 12:14:03 +05:30
mcarton
83a82a1d86
Remove redundancy in lint documentation
...
The default level is always given in the declare_lint! macro, no need to
add it inconsistently in the documentation.
2016-02-06 00:41:54 +01:00
mcarton
13f245f6c9
Fix util/update_wiki.py warnings and be consistent in declare_lint! invocations
2016-02-06 00:13:29 +01:00
mcarton
70124cf591
Fix case conventions
2016-02-05 21:54:29 +01:00
Manish Goregaokar
c9342d0121
fmt clippy
2016-01-04 09:56:12 +05:30
Manish Goregaokar
1605ef6ed4
Rustup to syntax::errors changes
2016-01-02 16:10:15 +05:30
llogiq
c645a9febe
adding missing doc comments
2015-12-14 22:16:56 +01:00
Oliver Schneider
902c7d832b
fix cc computation in the presence of diverging calls
...
CFG treats diverging calls as its completely own path out of the function.
While this makes sense, it should also mean that a panic should increase the cyclomatic
complexity. Instead it decreases it.
Minimal example:
```rust
if a {
b
} else {
panic!("cake");
}
d
```
creates the following graph
```dot
digraph G {
"if a" -> "b"
"if a" -> "panic!(\"cake\")"
"b" -> c
}
```
which has a CC of 1 (3 - 4 + 2). A CC of 1 means there is one path through the program.
Obviously that is wrong. There are two paths. One returning normally, and one panicking.
2015-12-14 14:29:20 +01:00
Manish Goregaokar
dc414e6c02
Make panic in CC silencable (partial #478 )
2015-12-05 14:23:00 +05:30
Oliver Schneider
617c820e6b
compute cyclomatic complexity (adjusted to not punish Rust's match
)
2015-12-03 16:41:55 +01:00