Fix CI: silence false-positive ShellCheck/EditorConfig findings
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user