Skip to content

Commit 174ef71

Browse files
bors[bot]Disasm
andauthored
Merge #44
44: Check code style on CI r=almindor a=Disasm Co-authored-by: Vadim Kaushan <[email protected]>
2 parents c58e349 + 38cb558 commit 174ef71

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ matrix:
2828
language: bash
2929
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
3030

31+
- env: RUSTFMT=1
32+
rust: stable
33+
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
34+
3135

3236
install:
3337
- ci/install.sh

ci/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ if [ -n "${CHECK_BLOBS:-}" ]; then
1212
curl -L https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14.tar.gz | tar --strip-components=1 -C gcc -xz
1313
fi
1414
fi
15+
16+
if [ -n "${RUSTFMT:-}" ]; then
17+
rustup component add rustfmt
18+
fi

ci/script.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ if [ -n "${CHECK_BLOBS:-}" ]; then
1414
PATH="$PATH:$PWD/gcc/bin"
1515
./check-blobs.sh
1616
fi
17+
18+
if [ -n "${RUSTFMT:-}" ]; then
19+
cargo fmt -- --check
20+
fi

0 commit comments

Comments
 (0)