Fix CI: silence false-positive ShellCheck/EditorConfig findings
Build Packages / Build .txz packages (push) Failing after 4s
Lint / ShellCheck (push) Successful in 11s
Lint / Validate .plg XML (push) Successful in 12s
Lint / EditorConfig (push) Successful in 5s

- podman-common.sh: file-wide shellcheck disable=SC2034 for its
  constants, which are intentionally defined for other scripts to
  source, not used within the file itself (ShellCheck can't see
  cross-file usage in that direction). Confirmed as the actual cause
  of the failing ShellCheck job via the real Gitea Actions log.
- podman-storage.sh: use the retry counter in cmd_unmount's log
  message instead of leaving it genuinely unused (real SC2034 hit,
  not a false positive).
- lint.yml: replace the editorconfig-checker/action-* marketplace
  action with a pinned, checksum-verified direct binary download —
  more robust than relying on third-party action resolution on
  self-hosted Gitea Actions runners — and disable its IndentSize
  check, which false-positives on Markdown's nested-list indentation
  and shell heredoc bodies. scripts/dev/lint.sh mirrors the same check
  for local use. All three lint.yml jobs verified passing locally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 11:18:25 +00:00
co-authored by Claude Sonnet 5
parent e2fefcdf9c
commit 2e6832903b
4 changed files with 55 additions and 3 deletions
+32 -1
View File
@@ -48,6 +48,37 @@ jobs:
editorconfig:
name: EditorConfig
runs-on: ubuntu-latest
# Installs the editorconfig-checker binary directly from its GitHub
# release instead of using the editorconfig-checker/action-* marketplace
# action: on self-hosted Gitea Actions runners, third-party action
# resolution can fail (observed as a 404 against the Gitea instance's
# own repo API while resolving the action) even with
# [actions].DEFAULT_ACTIONS_URL = github configured. A pinned, checksum
# -verified binary download has no such dependency on action resolution
# and works identically on GitHub-hosted and Gitea Actions runners.
env:
EC_VERSION: "3.8.0"
EC_SHA256: "5bda1d502d9a0bbd3caa0ef1d1e3b8ee496a18f226f69e0be06d24a0c8ae0237"
steps:
- uses: actions/checkout@v4
- uses: editorconfig-checker/action-editorconfig-checker@main
- name: Install editorconfig-checker
run: |
set -eu
curl -fL --retry 3 -o /tmp/ec.tar.gz \
"https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${EC_VERSION}/editorconfig-checker-linux-amd64.tar.gz"
echo "${EC_SHA256} /tmp/ec.tar.gz" | sha256sum -c -
tar -xzf /tmp/ec.tar.gz -C /tmp
sudo install -m 0755 /tmp/editorconfig-checker /usr/local/bin/ec
- name: Run editorconfig-checker
# -disable-indent-size: this check wants every line's indentation to
# be an exact multiple of .editorconfig's indent_size (2), which
# produces false positives for prose content this repo legitimately
# has a lot of — Markdown's own nested-list indentation rules (3
# spaces under "- ", 4 under numbered items) don't align with a
# flat "multiple of 2" rule, and neither do many shell heredoc
# bodies or the XML comment blocks in plugin/podman.plg. The other
# checks (trailing whitespace, final newline, charset, line length)
# stay enabled and catch real issues.
run: ec -disable-indent-size
+10
View File
@@ -22,6 +22,16 @@
# that set their own error-handling mode, and a library changing its
# caller's shell options would be a surprising action at a distance.
# shellcheck disable=SC2034
# This whole file is a "library" of constants and functions for OTHER
# scripts to `source` — see the header above. ShellCheck analyzes each file
# in isolation and has no way to see that e.g. $PODMAN_AUTOSTART_FILE is
# used in podman-autostart.sh, not here, so it flags every constant below
# as "appears unused". That is a false positive for this file's actual
# role; disabling SC2034 file-wide (this directive, placed before any code,
# applies to the whole file per ShellCheck's own rules) is more honest than
# scattering 15+ identical per-line suppressions.
# -----------------------------------------------------------------------------
# Path constants.
#
+1
View File
@@ -144,6 +144,7 @@ cmd_unmount() {
podman_log "storage: unmounted"
return 0
fi
podman_log "storage: unmount busy, retrying (attempt $attempt/5)"
sleep 1
done
+12 -2
View File
@@ -3,8 +3,10 @@
# scripts/dev/lint.sh
#
# Local developer entry point mirroring .github/workflows/lint.yml: runs
# ShellCheck over shell scripts/SlackBuilds and xmllint over plugin/podman.plg.
# Requires `shellcheck` and `xmllint` (libxml2) to be installed locally.
# ShellCheck over shell scripts/SlackBuilds, xmllint over plugin/podman.plg,
# and editorconfig-checker over the whole repo. Requires `shellcheck`,
# `xmllint` (libxml2), and `ec` (editorconfig-checker) to be installed
# locally — see the "editorconfig" job in lint.yml for how CI installs it.
# =============================================================================
set -eu
@@ -31,4 +33,12 @@ else
echo "!! xmllint not installed, skipping (part of libxml2-utils)" >&2
fi
if command -v ec > /dev/null 2>&1; then
echo "==> editorconfig-checker"
# -disable-indent-size: see the "editorconfig" job in lint.yml for why.
ec -disable-indent-size || status=1
else
echo "!! ec (editorconfig-checker) not installed, skipping (https://github.com/editorconfig-checker/editorconfig-checker)" >&2
fi
exit "$status"