Bring all shell into the lint surface#64
Conversation
Add home/dot_claude and tests bats files to lint, narrow statusline SC2154, drop dead WORK_DATA var.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c5a47684b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| line1="" | ||
|
|
||
| # Model | ||
| # shellcheck disable=SC2154 # assigned by the jq | eval block above |
There was a problem hiding this comment.
Keep SC2154 suppressed for all eval-assigned fields
Because the CI lint job runs mise lint, this narrowed disable leaves the other variables populated only through eval "$(jq ...)" (effort, used, remaining, total_cost, current_dir, worktree, agent_name) uncovered; ShellCheck's SC2154 documentation explicitly says it does not infer dynamic assignments such as eval var=value. With home/dot_claude now in shell_roots, lint will still fail on those references rather than bringing this script into the lint surface.
Useful? React with 👍 / 👎.
| done < <(find tests -type f -name '*.bats') | ||
|
|
||
| if [[ -n "${bats_targets[*]:-}" ]]; then | ||
| mise exec -- shellcheck --shell=bash --severity=warning "${bats_targets[@]}" |
There was a problem hiding this comment.
Stop parsing Bats tests as plain Bash
Existing tests use native Bats @test blocks, and Bats documents that this syntax is not Bash-compliant while ShellCheck's --shell option overrides shebang/extension detection. Forcing --shell=bash here makes mise lint parse every .bats file as plain Bash (the same issue is also reinforced by the repo .shellcheckrc), so the new test lint pass fails before it can report useful diagnostics.
Useful? React with 👍 / 👎.
Adds home/dot_claude and tests bats files to the mise lint surface so every shell script is ShellChecked, narrows the statusline SC2154 disable to the two eval-assigned references, and drops a dead WORK_DATA test variable.
Fixes DOT-36