Skip to content

[plan] Fix SC2155: Separate local declaration from assignment in 31 workflows #7897

@github-actions

Description

@github-actions

Objective

Fix 31 occurrences of shellcheck SC2155 warnings across workflow files. This is the highest priority issue as it's warning-level and can mask command failures.

Problem

Combining local declaration with command substitution masks the exit status:

local result=$(command)  # ❌ Exit status of 'command' is masked by 'local'

With set -e, the script should exit on errors, but this pattern prevents that - the exit status checked is from local (always 0), not from the command.

Solution

Split into two statements:

local result
result=$(command)  # ✅ Exit status properly checked

Affected Workflows (31 total)

Click to expand full list
  • audit-workflows
  • blog-auditor
  • cli-version-checker
  • cloclo
  • commit-changes-analyzer
  • copilot-agent-analysis
  • copilot-session-insights
  • daily-choice-test
  • daily-code-metrics
  • daily-doc-updater
  • daily-multi-device-docs-tester
  • developer-docs-consolidator
  • example-workflow-analyzer
  • github-mcp-structural-analysis
  • github-mcp-tools-report
  • go-fan
  • go-logger
  • go-pattern-detector
  • instructions-janitor
  • lockfile-stats
  • prompt-clustering-analysis
  • safe-output-health
  • schema-consistency-checker
  • scout
  • security-fix-pr
  • semantic-function-refactor
  • smoke-claude
  • smoke-detector
  • static-analysis-report
  • typist
  • unbloat-docs

Approach

  1. Search for pattern local.*=\$( in .github/workflows/*.md source files
  2. For each occurrence, split into two statements
  3. Recompile affected workflows: make recompile
  4. Verify fixes with: actionlint .github/workflows/*.lock.yml

Files to Modify

All files are in .github/workflows/:

  • 31 .md workflow source files (edit these)
  • Corresponding .lock.yml files (regenerated via make recompile)

Acceptance Criteria

AI generated by Plan Command for discussion #7889

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions