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

set -ex

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

if rustup component add rustfmt-preview ; then
    which rustfmt
    rustfmt -V
    cargo fmt --all -- --check
fi

if shellcheck --version ; then
    shellcheck -e SC2103 ci/*.sh
else
    echo "shellcheck not found"
    exit 1
fi