summaryrefslogtreecommitdiff
path: root/ci/style.sh
blob: 923e675b86d324089ef1a5337babf28c187da838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env sh

set -ex

rustc ci/style.rs && ./style src

rustup toolchain install nightly -c rustfmt --allow-downgrade
rustup override set nightly
command -v rustfmt
rustfmt -V
cargo fmt --all -- --check

if shellcheck --version ; then
    # GHA's shellcheck is too old (0.4.6) and cannot handle SC2153 correctly.
    shellcheck -e SC2103 -e SC2153 ci/*.sh
else
    echo "shellcheck not found"
    exit 1
fi