Skip to content

star lint shell finds scripts by file extension only, so it never checks a script without one #1206

Open

Description

@David-Noble-at-work

Area

Product

What happens

star lint shell finds the scripts it checks by file extension only. lint-shell.star's collect_files looks for *.sh, *.bash and *.zsh, so a script without an extension is never checked, and the check still reports green.

On develop at be7042d6 it misses three tracked scripts: .githooks/pre-commit, Home/noblefactor-ops.Unix/.local/bin/New-DevloreKeyVaults and that script's bash completion file. CI's Lint Shell step and make shell-lint both run star lint shell ., so CI reports green on all three without checking them. Only the pre-commit hook, which still runs .github/scripts/shell-lint.sh, covers them.

The right rule is already written. The shellcheck provider's isShellFile, in cmd/star/provider/shellcheck/provider.go, matches the three extensions, a #! line that names bash, sh or zsh, or a # shellcheck shell= line. Discovery should also skip .devlore, build and dist, as it skips .git, vendor and node_modules.

To make it happen: add a script with no extension and a shellcheck error, such as an unquoted variable, and run star lint shell .. It passes. It should fail on that script.

Split from #672, its plan's steps 4, 5 and 9, on 2026-11-06.

Evidence of completion

Before this issue closes, a comment on it links:

  • a run of star lint shell . in devlore-cli that checks the three scripts above; and
  • a test in which a bad script with no extension fails the lint, so the gap can't come back.

Plan and design documents

Kind Document
Plan docs/plans/shell-lint-via-star.md, #672's plan, steps 4, 5 and 9
Related #672, which moves devlore-cli's pre-commit hook onto star lint shell and waits on this; #1089, the shellcheck provider

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