summaryrefslogtreecommitdiffstats
path: root/ci/azure-rustfmt.yml
blob: f8e79d7209a3906bc0ee7a805440414efc23514f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
jobs:
# Check formatting
- job: ${{ parameters.name }}
  displayName: Check rustfmt
  pool:
    vmImage: ubuntu-16.04
  steps:
    - template: azure-install-rust.yml
      parameters:
        rust_version: ${{ parameters.rust }}
    - script: |
        rustup component add rustfmt
        cargo fmt --version
      displayName: Install rustfmt
    - script: |
        # Workaround for rust-lang/cargo#7732
        rustfmt --check --edition 2018 $(find . -name '*.rs' -print)
      displayName: Check formatting