File tree Expand file tree Collapse file tree 7 files changed +8
-24
lines changed Expand file tree Collapse file tree 7 files changed +8
-24
lines changed Original file line number Diff line number Diff line change 25
25
matrix :
26
26
fast_finish : true
27
27
include :
28
- - env : LINT="dev"
28
+ - env : CLIPPY='yes'
29
29
rust : nightly
30
30
allow_failures :
31
- - env : LINT="dev"
31
+ - env : CLIPPY='yes'
32
32
33
33
script :
34
34
# Test common features.
35
35
- cargo test --features="$FEATURES"
36
36
- |
37
- if [ $TRAVIS_RUST_VERSION = 'nightly' ]; then
38
- # Enable dev for clippy linting.
39
- cargo test --features="$FEATURES $LINT";
40
- # Lint nightly feature.
41
- cargo test --features="$FEATURES $LINT nightly";
37
+ if [ $CLIPPY = 'yes' ]; then
38
+ cargo install clippy && cargo clippy --all-features -- -D warnings;
42
39
fi
43
40
- |
44
41
if [ $TRAVIS_RUST_VERSION = 'stable' ]; then
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ travis-ci = { repository = "pingcap/rust-prometheus" }
15
15
16
16
[features ]
17
17
default = []
18
- dev = [" clippy" ]
19
18
nightly = [" libc" , " spin/unstable" ]
20
19
push = [" hyper" , " libc" ]
21
20
process = [" libc" , " procinfo" ]
@@ -24,7 +23,6 @@ gen = ["protobuf-codegen-pure"]
24
23
[dependencies ]
25
24
protobuf = " 2.0"
26
25
quick-error = " 0.2"
27
- clippy = {version = " ^0" , optional = true }
28
26
fnv = " 1.0"
29
27
lazy_static = " 0.2"
30
28
libc = {version = " 0.2" , optional = true }
Original file line number Diff line number Diff line change 8
8
test :
9
9
cargo test --features=" ${ENABLE_FEATURES} " -- --nocapture
10
10
11
- dev : format
12
- cargo test --features=" ${ENABLE_FEATURES} dev" -- --nocapture
11
+ dev : format test
13
12
14
13
bench : format
15
14
cargo bench --features=${ENABLE_FEATURES} -- --nocapture
16
15
17
16
format :
18
- @cargo fmt --all -- --write-mode diff > /dev/null || cargo fmt --all
17
+ @cargo fmt --all -- --check > /dev/null || cargo fmt --all
19
18
20
19
clean :
21
20
cargo clean
Original file line number Diff line number Diff line change 1
- // This file is generated by rust-protobuf 2.0.0 . Do not edit
1
+ // This file is generated by rust-protobuf 2.0.2 . Do not edit
2
2
// @generated
3
3
4
4
// https://github.com/Manishearth/rust-clippy/issues/702
Original file line number Diff line number Diff line change 1
1
reorder_imports = true
2
- reorder_imports_in_group = true
3
- reorder_extern_crates = true
4
- reorder_extern_crates_in_group = true
5
2
use_try_shorthand = true
Original file line number Diff line number Diff line change 15
15
The Rust client library for [Prometheus](https://prometheus.io/).
16
16
*/
17
17
18
- #![ cfg_attr( feature = "dev" , feature( plugin) ) ]
19
- #![ cfg_attr( feature = "dev" , plugin( clippy) ) ]
20
- #![ cfg_attr( not( feature = "dev" ) , allow( unknown_lints) ) ]
21
- #![ cfg_attr( feature = "dev" , allow( needless_pass_by_value) ) ]
22
- #![ cfg_attr( feature = "dev" , allow( new_without_default_derive) ) ]
18
+ #![ cfg_attr( feature = "cargo-clippy" , allow( needless_pass_by_value, new_without_default_derive) ) ]
23
19
#![ cfg_attr( feature = "nightly" , feature( integer_atomics) ) ]
24
20
25
21
#[ macro_use]
Original file line number Diff line number Diff line change 1
1
reorder_imports = true
2
- reorder_imports_in_group = true
3
- reorder_extern_crates = true
4
- reorder_extern_crates_in_group = true
5
2
use_try_shorthand = true
You can’t perform that action at this time.
0 commit comments