Skip to content

star hook pre-commit passes when shellcheck, shfmt or markdownlint isn't installed #1209

Open

Description

@David-Noble-at-work

Area

Product

What happens

star hook pre-commit passes a check whose tool isn't installed. In hook-pre-commit.star, run_shell_check returns True when shellcheck or shfmt is missing, and run_markdown_check returns True when markdownlint-cli2 is missing, both under the comment "Skip silently if tools not installed". The hook then reports "All pre-commit checks passed" having checked nothing. star lint shell already does the right thing: it fails and prints the install command.

To make it happen, once #1207 is fixed: on a machine without shfmt, run star hook pre-commit. It passes. It should fail, naming the missing tool and the command that installs it.

Found on 2026-11-06 while splitting #672; its plan does not name it.

Evidence of completion

Before this issue closes, a comment on it links a test in which the hook, with a lint tool missing, fails and names the tool.

Plan and design documents

Kind Document
Plan Not yet opened
Related #1207, which this waits on; #672

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions