From c6a16cd37d85031b51582034402128f9c3481ffb Mon Sep 17 00:00:00 2001 From: David Keijser Date: Thu, 21 Nov 2024 14:45:20 +0100 Subject: [PATCH 1/3] Run shellcheck as github action --- .github/workflows/shellcheck.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/shellcheck.yml diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000..c13ea35 --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,16 @@ +name: ShellCheck + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master From 00b44177f14b81ad8c8835d2bc17b94b1eafbdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Thu, 21 Nov 2024 18:01:06 +0100 Subject: [PATCH 2/3] fix: cover remaining shellcheck issues in git-fixup Yes, this is awkward, but there is not block-wide shellcheck ignore, only by-line or by-file. --- git-fixup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-fixup b/git-fixup index 6ecba09..f0919e9 100755 --- a/git-fixup +++ b/git-fixup @@ -138,9 +138,13 @@ function fallback_menu() { ;; help|h) local fmt="%s\n %s\n" + # shellcheck disable=SC2059 printf "$fmt" "" "$op the -th commit from the list" >&2 + # shellcheck disable=SC2059 printf "$fmt" "s[how] " "show the -th commit from the list" >&2 + # shellcheck disable=SC2059 printf "$fmt" "q[uit]" "abort operation" >&2 + # shellcheck disable=SC2059 printf "$fmt" "h[elp]" "show this help message" >&2 ;; esac From 72e2213c121af75730bb5e55887f47a949557d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Thu, 21 Nov 2024 18:04:27 +0100 Subject: [PATCH 3/3] fix: ignore non-POSIX completion scripts --- .github/workflows/shellcheck.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index c13ea35..693ddde 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -14,3 +14,5 @@ jobs: - uses: actions/checkout@v4 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master + with: + ignore_paths: ./completion.* \ No newline at end of file