Skip to content

Fix ShellCheck SC2286 in keygen script to unblock Linting Summary job - #100

Merged
xaoscience merged 2 commits into
mainfrom
copilot/fix-linting-summary-job
Aug 23, 2026
Merged

Fix ShellCheck SC2286 in keygen script to unblock Linting Summary job#100
xaoscience merged 2 commits into
mainfrom
copilot/fix-linting-summary-job

Conversation

Copilot AI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The Linting Summary GitHub Actions job was failing because ShellCheck Analysis & Suggestions reported one error-level finding (SC2286), which causes the summary job to exit non-zero. This change removes that error at the source in scripts/lib/keygen.sh.

  • Root cause

    • scripts/lib/keygen.sh used an empty-string fallback as a command after command substitution:
      • ... ) || ""
    • ShellCheck flags this as SC2286 (“empty string interpreted as command name”).
  • Targeted fix

    • Replaced the invalid fallback command with a no-op success fallback:
      • ... ) || true
    • This preserves existing behavior (ignore command-substitution failure and continue with explicit downstream KEY_ID emptiness check) while eliminating the lint error.
  • Code change

    # before
    KEY_ID=$(gpg --list-secret-keys --keyid-format LONG "$EMAIL" 2>/dev/null | awk '/^sec/ {print $2}' | cut -d'/' -f2 | head -n 1) || ""
    
    # after
    KEY_ID=$(gpg --list-secret-keys --keyid-format LONG "$EMAIL" 2>/dev/null | awk '/^sec/ {print $2}' | cut -d'/' -f2 | head -n 1) || true

Co-authored-by: xaoscience <69734795+xaoscience@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job linting summary Fix ShellCheck SC2286 in keygen script to unblock Linting Summary job Aug 23, 2026
Copilot AI requested a review from xaoscience August 23, 2026 05:10
@xaoscience
xaoscience marked this pull request as ready for review August 23, 2026 05:17
@xaoscience
xaoscience merged commit 1855a65 into main Aug 23, 2026
11 checks passed
@xaoscience
xaoscience deleted the copilot/fix-linting-summary-job branch August 23, 2026 05:18
xaoscience added a commit that referenced this pull request Aug 23, 2026
Fix ShellCheck SC2286 in keygen script to unblock Linting Summary job
yay, happy 100
(this was pretty wasteful codeql)
@xaoscience

Copy link
Copy Markdown
Member

Happy happy happy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants