浏览代码

.travis.yml: add rustfmt

awiouy 7 年之前
父节点
当前提交
8658ad3a62
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      .travis.yml

+ 4 - 0
.travis.yml

@@ -20,6 +20,10 @@ before_script:
     - echo '[target.armv7-unknown-linux-gnueabihf]' > ~/.cargo/config
     - echo 'linker = "arm-linux-gnueabihf-gcc"' >> ~/.cargo/config
     - rustup target add armv7-unknown-linux-gnueabihf
+    - if [[ $TRAVIS_RUST_VERSION == *"nightly"* ]]; then
+         rustup component add rustfmt-preview;
+         cargo fmt --package=librespot-core -- --write-mode=diff;
+      fi
 
 script:
     - cargo build --no-default-features