mcarton
0e4259a827
Remove duplicated if_let_chain! macro definition
2015-12-22 00:48:50 +01:00
Manish Goregaokar
cd3c649adb
Merge pull request #508 from devonhollowood/underscore_macros
...
Implement #507
2015-12-21 17:23:56 +05:30
Devon Hollowood
b6766a0dcf
Add RustcEncodable test
2015-12-21 01:40:19 -08:00
Devon Hollowood
b190aa7deb
Implement #507
...
Make `used_underscore_binding` lint compatible with MacroAttributes
expansions. TODO: Add a good test for this.
2015-12-21 01:03:12 -08:00
Manish Goregaokar
4a32445aa7
Add macro check to used_underscore
2015-12-20 04:53:29 +05:30
Manish Goregaokar
a65a7770b3
Rust upgrade to rustc 1.7.0-nightly ( 8ad12c3e2
2015-12-19)
2015-12-19 19:08:22 +05:30
Manish Goregaokar
9dca15de3e
Merge pull request #499 from devonhollowood/underscore_binding
...
Add used_underscore_binding lint
2015-12-19 19:02:06 +05:30
Devon Hollowood
bd82c082cb
Add test for struct fields
2015-12-18 16:29:22 -08:00
Devon Hollowood
98d21f9fc5
Make compatible with unused_variables
lint
2015-12-18 16:04:33 -08:00
Devon Hollowood
c8d78a70b3
Test that we do not lint for multiple underscores
2015-12-18 13:47:12 -08:00
Devon Hollowood
02cb24de82
Remove local variable check
2015-12-18 13:45:03 -08:00
Devon Hollowood
3533d3a223
Add more tests
2015-12-18 00:57:09 -08:00
Manish Goregaokar
b900e88910
Merge pull request #494 from sanxiyn/suggestion-2
...
Use suggestion for needless_return
2015-12-17 22:17:32 +05:30
Devon Hollowood
e620a1d57c
Make suggested changes
2015-12-16 17:28:26 -08:00
Manish Goregaokar
d31f47496c
Merge pull request #503 from sanxiyn/dogfood
...
Don't dogfood twice
2015-12-16 20:23:29 +05:30
Seo Sanghyeon
f3f5e3cb25
Don't dogfood twice
2015-12-16 23:13:01 +09:00
Manish Goregaokar
494fec7f6e
Merge pull request #502 from Manishearth/contrib
...
Add short section on lint docs
2015-12-15 05:36:42 +05:30
llogiq
dc9a08fc78
Add short section on lint docs
2015-12-14 22:23:33 +01:00
llogiq
c645a9febe
adding missing doc comments
2015-12-14 22:16:56 +01:00
llogiq
827082ac41
fix boxed_local example
2015-12-14 21:17:11 +01:00
Manish Goregaokar
8105260d6e
Merge pull request #501 from oli-obk/fix/seme
...
fix cyclomatic complexity lint (fixes #491 , fixes #478 )
2015-12-14 22:23:42 +05:30
Oliver Schneider
cc1d696cb9
fix fallout from CC improvements
2015-12-14 14:30:09 +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
llogiq
c0bccc9567
more doc comments
2015-12-14 13:32:07 +01:00
Manish Goregaokar
dc3a3e79db
Merge pull request #500 from oli-obk/patch-1
...
compiletest_rs needs to be at least 0.0.11
2015-12-14 17:51:25 +05:30
Oliver Schneider
ecb97866b6
compiletest_rs needs to be at least 0.0.11
...
otherwise tests using `SUGGESTION` will fail (see `compile-fail/eta.rs`)
2015-12-14 11:28:22 +01:00
llogiq
d7292fe235
more docs
2015-12-14 08:03:01 +01:00
Manish Goregaokar
f2b977907c
Merge branch 'more_wiki'
2015-12-13 21:58:18 +05:30
Devon Hollowood
6960bf2ebc
Make ExprField follow single-underscore rules
2015-12-12 21:59:25 -08:00
Devon Hollowood
b24e3aeea0
Add wiki docs, in line with #492
2015-12-12 21:56:05 -08:00
Devon Hollowood
92fba6bd2c
Make clippy tests compatible with new lint
2015-12-12 21:39:10 -08:00
Devon Hollowood
aeb5a0e60c
Reduce false positives
...
Add macro checking, and only lint for single leading underscores
2015-12-12 21:39:10 -08:00
Devon Hollowood
6091112698
Update tests
2015-12-12 21:39:10 -08:00
Devon Hollowood
43b96d59ad
Run update_lints.py
2015-12-12 21:39:10 -08:00
Devon Hollowood
9de308ee15
Add used_underscore_binding lint
2015-12-12 21:39:10 -08:00
Devon Hollowood
6482840bc5
Add tests
2015-12-12 21:39:10 -08:00
Manish Goregaokar
4ae43b10f0
Add wiki note for escape analysis
2015-12-13 09:08:58 +05:30
Manish Goregaokar
76049a7cd0
Merge pull request #497 from cesarb/ringbuf
...
Mention VecDeque in linkedlist lint
2015-12-12 19:22:55 -05: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
Manish Goregaokar
6aa656a910
Merge pull request #492 from Manishearth/wiki
...
added wiki comments + wiki-generating python script
2015-12-11 09:20:19 -05:00
Seo Sanghyeon
974ab43453
Use suggestion for needless_return
2015-12-11 16:28:05 +09:00
llogiq
5bbc1427fd
added wiki comments + wiki-generating python script
2015-12-11 01:22:27 +01:00
llogiq
3e7677ff31
Merge pull request #490 from Manishearth/fx-lifetime-fp
...
Check for unused lifetimes in bounds (fixes #489 )
2015-12-10 18:14:24 +01:00
Manish Goregaokar
b9546599e3
Check for unused lifetimes in bounds ( fixes #489 )
2015-12-10 12:02:59 -05:00
Manish Goregaokar
b865e30b49
Upgrade rust to rustc 1.6.0-nightly ( 462ec0576
2015-12-09)
2015-12-09 15:56:49 -05:00
llogiq
2fbe762a99
Merge pull request #485 from sanxiyn/suggestion
...
Use suggestion for redundant_closure
2015-12-08 23:18:25 +01:00
Seo Sanghyeon
213c15cd66
Add span_lint_and_then and use it
2015-12-09 02:46:14 +09:00
Seo Sanghyeon
35b5c3efdd
Use suggestion for redundant_closure
2015-12-08 15:03:01 +09:00
Andre Bogus
98c4dc185c
updated lints
2015-12-08 06:32:55 +01:00
llogiq
3260b501a2
Merge pull request #483 from Manishearth/bored
...
Add lint for unused lifetimes (fixes #459 )
2015-12-07 21:47:10 +01:00