chore: add ShellCheck lint script (#6)#9
Merged
Conversation
Introduce `npm run lint` (shellcheck) to unblock the pre-push hook's
lint stage.
- Add `lint` npm script covering easy, commands/*.sh, easyhome/* shell
scripts, and .husky/pre-push
- Fix real errors:
- easy: quote $@ in 4 dispatcher call sites (SC2068 — arg resplitting)
- commands/proxy.sh: fix broken debug() — $(>&2 echo $@) executes
captured-empty output; replaced with >&2 echo "$@" (SC2328/SC2068)
- Baseline remaining pre-existing warnings with documented file-level
`# shellcheck disable=` directives (cleanup tracked in #8)
- Document shellcheck prerequisite + `npm run lint` in CLAUDE.md
Closes #6
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
Smoke test — dispatcher ✓ Ran with
The
|
5 tasks
montoyaedu
added a commit
that referenced
this pull request
May 18, 2026
STATE.md was dated 2026-04-02 and predated the entire test-harness / ShellCheck / issue-5 / release-prep / self-contained-build work — it still listed obsolete blockers (push the base image to Docker Hub). Rewrite it: current version state, the PRs #9–#17 shipped this phase, the remaining items (npm publish, clean-room test, real IONOS test). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Introduces
npm run lint(ShellCheck) — blocker 1 of 2 for unblockinggit push. The.husky/pre-pushhook's Lint stage rannpm run lint, which didn't exist; now it does and exits 0.Closes #6.
Changes
New
lintscript (package.json) — runsshellcheckover the project's own shell sources:easy,configure-local-devenv,commands/*.sh, theeasyhome/shell scripts, and.husky/pre-push.Real errors fixed:
easy—$@passed unquoted at 4 dispatcher call sites (ruby,python,__easy_command_*, top-leveleasy).SC2068— unquoted$@re-splits arguments. Now"$@".commands/proxy.sh—debug()was$(>&2 echo $@): the$()captures stdout (redirected away → empty) and then tries to execute that empty string. Replaced with>&2 echo "$@". FixesSC2328/SC2068/SC2091/SC2327/SC2116.Pre-existing warnings baselined — per the agreed scoped approach, the remaining ~55 findings (mostly
SC2086unquoted vars,SC2155declare+assign) are suppressed with documented file-level# shellcheck disable=directives, each pointing to the cleanup issue. Burn-down tracked in #8.Docs —
CLAUDE.md§3 documents theshellcheckprerequisite andnpm run lint.Scope deviation from the issue
Issue #6 listed
bin/*.shas lint targets. Those are metaswarm-vendored third-party scripts (overwritten on plugin update) — addingdisabledirectives to them would be inappropriate, so they're excluded from the lint set..husky/pre-pushis included (currently clean).Test plan
npm run lintexits0bash -nsyntax check passes on all 6 edited shell filespackage.jsonis valid JSONCLAUDE.md§6) — recommended before merge, since there's no automated suite yet (that's Add bats test harness + kcov coverage tooling (unblocks pre-push hook — coverage stage) #7)Notes
kcov coverage bats test/) still fails — that's blocker 2, fixed by Add bats test harness + kcov coverage tooling (unblocks pre-push hook — coverage stage) #7. This branch was pushed withgit push --no-verify; once Add bats test harness + kcov coverage tooling (unblocks pre-push hook — coverage stage) #7 merges, pushes work without it.🤖 Generated with Claude Code