File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -31,19 +31,18 @@ matrix:
31
31
- env : INTEGRATION=rand
32
32
- env : INTEGRATION=rust-clippy
33
33
- env : INTEGRATION=rust-semverver
34
- - env : INTEGRATION=stdsimd
35
34
- env : INTEGRATION=tempdir
36
35
allow_failures :
37
- # Need to run an lalrpop build step before testing?
36
+ # See: https://github.com/rust-lang-nursery/rustfmt/issues/2789
38
37
- env : INTEGRATION=chalk
39
38
# PR sent
40
39
- env : INTEGRATION=crater
41
40
# #2721
42
41
- env : INTEGRATION=rand
43
42
# Doesn't build
44
43
- env : INTEGRATION=rust-clippy
45
- # Doesn't build
46
- - env : INTEGRATION=rust-semverver
44
+ # See: https://github.com/rust-lang-nursery/rustfmt/issues/2787
45
+ - env : INTEGRATION=stdsimd
47
46
48
47
before_script :
49
48
- |
Original file line number Diff line number Diff line change @@ -20,10 +20,15 @@ cargo install --force
20
20
echo " Integration tests for: ${INTEGRATION} "
21
21
cargo fmt -- --version
22
22
23
+ # Checks that:
24
+ #
25
+ # * `cargo fmt --all` succeeds without any warnings or errors
26
+ # * `cargo fmt --all -- --check` after formatting returns success
27
+ # * `cargo test -all` still passes (formatting did not break the build)
23
28
function check_fmt {
24
29
touch rustfmt.toml
25
- cargo fmt --all -v 2>&1 | tee rustfmt_output
26
- if [[ $? != 0 ]]; then
30
+ cargo fmt --all -v | & tee rustfmt_output
31
+ if [[ ${PIPESTATUS[0]} != 0 ]]; then
27
32
cat rustfmt_output
28
33
return 1
29
34
fi
@@ -40,6 +45,11 @@ function check_fmt {
40
45
if [[ $? != 0 ]]; then
41
46
return 1
42
47
fi
48
+ cargo fmt --all -- --check | & tee rustfmt_check_output
49
+ if [[ ${PIPESTATUS[0]} != 0 ]]; then
50
+ cat rustfmt_check_output
51
+ return 1
52
+ fi
43
53
cargo test --all
44
54
if [[ $? != 0 ]]; then
45
55
return $?
You can’t perform that action at this time.
0 commit comments