Skip to content

fix(scripts): split rendered declaration in lint_zsh_template - #170

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
droid/ghi167-fix-sc2155
Open

fix(scripts): split rendered declaration in lint_zsh_template#170
github-actions[bot] wants to merge 1 commit into
mainfrom
droid/ghi167-fix-sc2155

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated fix attempt

This PR was generated by the droid-issue-fixer GitHub Action, which runs droid exec headlessly to attempt an open issue.

Closes #167

Droid exec summary

Fixed issue #167.

In scripts/lint-shell-templates.sh, I split the local rendered declaration from its assignment inside lint_zsh_template():

local rendered
rendered="$tmpdir/$(basename "$tmpl" .tmpl)"

This prevents local's always-zero exit status from masking a failed $(basename ...) command substitution, resolving shellcheck SC2155. The rendered path and lint behavior are unchanged.

I added an in-line comment explaining the SC2155 rationale. Validation passed:

  • bash -n scripts/lint-shell-templates.sh
  • shellcheck --severity=warning -s bash scripts/lint-shell-templates.sh

Committed as fix(scripts): split rendered declaration in lint_zsh_template with Fixes #167.

Split the local rendered declaration from its assignment in

lint_zsh_template() so a failed $(basename ...) command

substitution is not masked by local's always-zero exit status.

This resolves shellcheck SC2155 without changing the rendered path

or lint behavior.

Fixes #167
@github-actions github-actions Bot added the droid PR generated by droid-issue-fixer action label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

droid PR generated by droid-issue-fixer action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sweeper] scripts/lint-shell-templates.sh

1 participant