Skip to content

ci: Make consumer scripts shellcheck-clean and widen lint scope #52

Description

@rubambiza

Summary

The test CI added in #35 (.github/workflows/tests.yml) runs shellcheck on the library modules only (core.sh, github-api.sh, fork.sh, org.sh, program-lib.sh) at --severity=warning. The consumer program scripts are not yet shellcheck-clean, so they are deliberately excluded from the lint step for now. This issue tracks bringing them up to standard and widening the lint scope.

Current state

shellcheck scripts/*.sh at --severity=warning reports 19 SC2034 (unused variable) warnings across seven consumer scripts, plus a few info-level notices:

File SC2034 count
automation-health-dashboard.sh 3
dep-bump-fixer.sh 2
dep-bump-scanner.sh 2
link-health-fixer.sh 4
link-health-scanner.sh 4
pr-review-impact.sh 2
pr-review-scanner.sh 2

Most are the arg-parsing idiom where --flag) SOME_FLAG="$2" assigns a variable that a later load_org_profile / resolution step reads indirectly, so shellcheck cannot see the use. Info-level notices (SC2016, SC2153) also appear on a couple of files. The tests/*.sh files carry their own minor warnings (SC2034, SC2163).

Proposed work

  • Audit each SC2034: either wire the variable through so its use is visible, or add a scoped # shellcheck disable=SC2034 with a one-line reason at the assignment.
  • Resolve or scope the info-level notices in the consumer scripts and the test files.
  • Once clean, widen the CI shellcheck step to scripts/*.sh (and optionally tests/*.sh).

Why separate from #35

#35 is a scoped decomposition + portability PR; fixing pre-existing warnings across every consumer script is unrelated cleanup and would violate the repo's scope-discipline rule (CLAUDE.md). Splitting it out keeps #35 reviewable and lets the lint sweep land on its own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions