From 700d6b6cf828ae51f35c7ab777858460a6ac9772 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Sun, 24 Sep 2023 02:50:50 +0200 Subject: [PATCH] Add shellcheck to precommit --- .pre-commit-config.yaml | 12 ++++++++---- bin/notify-on-start | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e97ed521..06192db1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,8 +32,12 @@ repos: hooks: - id: sync-pre-commit-deps - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.5 hooks: - - id: codespell - additional_dependencies: - - tomli + - id: codespell + additional_dependencies: + - tomli + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.9.0.5 + hooks: + - id: shellcheck diff --git a/bin/notify-on-start b/bin/notify-on-start index c0695ea4..1e4ca29d 100755 --- a/bin/notify-on-start +++ b/bin/notify-on-start @@ -15,7 +15,7 @@ slack_ts_output="${2:?A Slack thread timestamp file is required as the second ar slack_response="$(mktemp -t slack-response-XXXXXX)" -trap "rm -f '$slack_response'" EXIT +trap 'rm -f "$slack_response"' EXIT echo "Notifying Slack about starting build." message="Pipeline starting for the \`$build_name\` build, which will run the phylogenetics and deploy the build."