44: Check code style on CI r=almindor a=Disasm Co-authored-by: Vadim Kaushan <admin@disasm.info>
@@ -28,6 +28,10 @@ matrix:
language: bash
if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
+ - env: RUSTFMT=1
+ rust: stable
+ if: (branch = staging OR branch = trying OR branch = master) OR (type = pull_request AND branch = master)
+
install:
- ci/install.sh
@@ -12,3 +12,7 @@ if [ -n "${CHECK_BLOBS:-}" ]; then
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
fi
+if [ -n "${RUSTFMT:-}" ]; then
+ rustup component add rustfmt
+fi
@@ -14,3 +14,7 @@ if [ -n "${CHECK_BLOBS:-}" ]; then
PATH="$PATH:$PWD/gcc/bin"
./check-blobs.sh
+ cargo fmt -- --check