From 62875da50514894129a203abd453b4148e8408c0 Mon Sep 17 00:00:00 2001 From: Julian Ladisch Date: Wed, 5 Aug 2026 22:51:06 +0200 Subject: [PATCH 1/3] Explain to ignore lint errors at line level only --- .github/workflows/_actionlint.yml | 5 ++--- CHANGELOG.md | 2 +- README.md | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/_actionlint.yml b/.github/workflows/_actionlint.yml index b36b4a9..206c484 100644 --- a/.github/workflows/_actionlint.yml +++ b/.github/workflows/_actionlint.yml @@ -22,6 +22,5 @@ jobs: - name: actionlint uses: raven-actions/actionlint@v2 -# with: -# # overly pedantic quoting requirements -# flags: -ignore SC2046 -ignore SC2086 + # do NOT ignore errors at the run level or at the file level; ignore them at the line level only: + # https://github.com/koalaman/shellcheck/wiki/ignore diff --git a/CHANGELOG.md b/CHANGELOG.md index d807d11..3e338b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## IN PROGRESS -* FOLIO-4555 Double-quote variables - in #164 +* FOLIO-4555 Double-quote variables - in #164, #166 * (Add more progress summary items here.) ## [1.16.3](https://github.com/folio-org/.github/tree/v1.16.3) (2026-07-14) diff --git a/README.md b/README.md index deb6909..85327b6 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,11 @@ While developing Workflows run actionlint prior to each commit. It is very helpf actionlint *.yml ``` -It includes "shellcheck". The following invocation skips some well-known shellcheck basic issues (but it is best to fix them before commit): +It includes "shellcheck". -``` -SHELLCHECK_OPTS='--exclude=SC2086,SC2046' actionlint *.yml -``` +If there is a false positive disable it at the line level. Avoid diabling it at the file or run level because we want linting for future file changes. + +For details see [ShellCheck Ignore](https://github.com/koalaman/shellcheck/wiki/ignore). There is an automated workflow that will run `actionlint` on pull-requests. From 035353a1f6cfdf6654e6c521418b92fea23618a0 Mon Sep 17 00:00:00 2001 From: Julian Ladisch Date: Wed, 5 Aug 2026 22:51:56 +0200 Subject: [PATCH 2/3] Fix options quoting of generate_dockerhub_description.py --- .github/workflows/docker-description.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-description.yml b/.github/workflows/docker-description.yml index b178984..0fe2826 100644 --- a/.github/workflows/docker-description.yml +++ b/.github/workflows/docker-description.yml @@ -46,18 +46,17 @@ jobs: ARTIFACT_ID: ${{ inputs.artifact-id }} DESCRIPTION: ${{ inputs.repo-description }} run: | - if [ "$PUBLISH_MODULE_DESCRIPTOR" = "true" ]; then - option_md="--module-descriptor ModuleDescriptor.json" - else - option_md="" - fi - echo "option_md=${option_md}" - python3 folio-tools/github-actions-scripts/generate_dockerhub_description.py \ - --loglevel debug \ - --repo-url "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \ - --module-name "$ARTIFACT_ID" \ - --description "$DESCRIPTION" \ - --output-file dockerhub-description.md "${option_md}" + # Use array for proper quoting: https://github.com/koalaman/shellcheck/wiki/SC2086#exceptions + options=( + --loglevel debug + --repo-url "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + --module-name "$ARTIFACT_ID" + --description "$DESCRIPTION" + --output-file dockerhub-description.md + ) + [ "$PUBLISH_MODULE_DESCRIPTOR" = "true" ] && options=("${options[@]}" --module-descriptor ModuleDescriptor.json) + echo "options=${options[@]}" + python3 folio-tools/github-actions-scripts/generate_dockerhub_description.py "${options[@]}" - name: Show description output run: cat dockerhub-description.md From c4071009aaa96a599b2181d4966bc80180d53ad0 Mon Sep 17 00:00:00 2001 From: Julian Ladisch Date: Wed, 5 Aug 2026 23:04:16 +0200 Subject: [PATCH 3/3] Fix mixing string and array --- .github/workflows/docker-description.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-description.yml b/.github/workflows/docker-description.yml index 0fe2826..ccbc148 100644 --- a/.github/workflows/docker-description.yml +++ b/.github/workflows/docker-description.yml @@ -55,7 +55,7 @@ jobs: --output-file dockerhub-description.md ) [ "$PUBLISH_MODULE_DESCRIPTOR" = "true" ] && options=("${options[@]}" --module-descriptor ModuleDescriptor.json) - echo "options=${options[@]}" + echo "options:" "${options[@]}" python3 folio-tools/github-actions-scripts/generate_dockerhub_description.py "${options[@]}" - name: Show description output