Context
Follow-up to #6. When ShellCheck was introduced (#6), the core CLI had ~60 pre-existing findings. To keep #6 scoped to "add the linter", #6 fixed only the real errors (unquoted $@ arg-resplitting in easy, the broken debug() in proxy.sh) and baselined the remaining warnings/info with file-level # shellcheck disable= directives.
This issue tracks burning down that baseline — fixing the findings for real and removing the disable directives.
Baselined findings to fix
Each file has a # shellcheck disable= directive at the top referencing this issue. Fix the findings, then remove the directive.
| File |
Baselined codes |
easy |
SC1001, SC1090, SC2046, SC2086, SC2155, SC2164 |
configure-local-devenv |
SC2155 |
commands/proxy.sh |
SC2046, SC2086, SC2124, SC2155, SC2181 |
easyhome/add_domain |
SC2086 |
easyhome/add_subdomain_http |
SC2086 |
easyhome/add_subdomain_https |
SC2086 |
What the codes mean
- SC2086 — unquoted variable (globbing/word-splitting risk). The bulk of the noise; mostly mechanical quoting.
- SC2155 —
local x=$(...) masks the command's exit code. Split into local x; x=$(...).
- SC2046 — unquoted command substitution needs quoting.
- SC2164 —
cd $D without || exit — genuine latent bug (__private_easy_usage in easy lists the wrong dir if cd fails).
- SC2124 —
proxy.sh:19 local -r expected="${@}" assigns an array to a string.
- SC2181 —
proxy.sh:255 checks $? indirectly; use if cmd; then.
- SC1001 —
easy:53 \: in grep is a literal :.
- SC1090 —
easy:90 source ${C_SH} — non-constant source; add a # shellcheck source= directive.
Recommended approach
Do this after #7 (bats test harness) lands — the test suite gives a safety net for changes to easy/proxy.sh dispatcher logic. Fix file-by-file; after each, npm run lint should still pass and the file's disable directive should be gone.
Acceptance criteria
🤖 Generated with Claude Code
Context
Follow-up to #6. When ShellCheck was introduced (#6), the core CLI had ~60 pre-existing findings. To keep #6 scoped to "add the linter", #6 fixed only the real errors (unquoted
$@arg-resplitting ineasy, the brokendebug()inproxy.sh) and baselined the remaining warnings/info with file-level# shellcheck disable=directives.This issue tracks burning down that baseline — fixing the findings for real and removing the
disabledirectives.Baselined findings to fix
Each file has a
# shellcheck disable=directive at the top referencing this issue. Fix the findings, then remove the directive.easyconfigure-local-devenvcommands/proxy.sheasyhome/add_domaineasyhome/add_subdomain_httpeasyhome/add_subdomain_httpsWhat the codes mean
local x=$(...)masks the command's exit code. Split intolocal x; x=$(...).cd $Dwithout|| exit— genuine latent bug (__private_easy_usageineasylists the wrong dir ifcdfails).proxy.sh:19local -r expected="${@}"assigns an array to a string.proxy.sh:255checks$?indirectly; useif cmd; then.easy:53\:in grep is a literal:.easy:90source ${C_SH}— non-constant source; add a# shellcheck source=directive.Recommended approach
Do this after #7 (bats test harness) lands — the test suite gives a safety net for changes to
easy/proxy.shdispatcher logic. Fix file-by-file; after each,npm run lintshould still pass and the file'sdisabledirective should be gone.Acceptance criteria
# shellcheck disable=baseline directive added in Add ShellChecklintscript (unblocks pre-push hook — lint stage) #6 is removed.npm run lintexits 0 with no baseline directives remaining.CLAUDE.md§6).🤖 Generated with Claude Code