summaryrefslogtreecommitdiffstats
path: root/library/stdarch/ci/style.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /library/stdarch/ci/style.sh
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/stdarch/ci/style.sh')
-rwxr-xr-xlibrary/stdarch/ci/style.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/library/stdarch/ci/style.sh b/library/stdarch/ci/style.sh
new file mode 100755
index 000000000..8f81883f3
--- /dev/null
+++ b/library/stdarch/ci/style.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env sh
+
+set -ex
+
+if rustup component add rustfmt-preview ; then
+ command -v rustfmt
+ rustfmt -V
+ cargo fmt --all -- --check
+fi
+
+# if rustup component add clippy-preview ; then
+# cargo clippy -V
+# cargo clippy --all -- -D clippy::pedantic
+# fi
+
+if shellcheck --version ; then
+ shellcheck -e SC2103 ci/*.sh
+else
+ echo "shellcheck not found"
+ exit 1
+fi
+