Skip to content

CI lints neither Markdown, PowerShell, Go style nor copyright: star lint has all four and CI calls none #964

Description

@David-Noble-at-work

CI lints Go and shell, and nothing else. .github/workflows/ci.yaml runs make vet-all, star lint go ./..., make lint-all and star lint shell .. It never runs star lint all, star lint markdown, star lint go-style or star lint copyright, although star has all four. It has no PowerShell step, although install.ps1 ships to users; noblefactor-ops's CI has one. make check runs none of these either.

Measured on 2026-09-27, at 3816e9ca (develop at 9cd1e95d plus one plan commit):

Linter In CI Result
make vet-all, star lint go, make lint-all yes —
star lint shell (shellcheck, shfmt) yes —
star lint copyright no passes: 984 files
star lint go-style no 5,439 violations in 843 files
star lint markdown (markdownlint-cli2, frontmatter) no 471 Markdown files; not measured: the tool needs Node, which the machine did not have
PSScriptAnalyzer, the organization's settings (noblefactor-ops/Home/common/.config/PSScriptAnalyzer/PSScriptAnalyzerSettings.psd1) no install.ps1: 33 findings. 30 PSAvoidUsingWriteHost, 1 PSReviewUnusedParameter, 1 PSUseBOMForUnicodeEncodedFile, 1 PSUseSingularNouns. Two .ps1 test fixtures are also unchecked

Found while writing #950 (lane 11 of #949). Ruled the same day by the owner: CI that does not lint is broken, and is repaired immediately.

Resolution

  1. CI runs every linter the repository has: star lint all, or each of copyright, go-style and markdown by name, plus a PowerShell step to noblefactor-ops's pattern.
  2. Everything those linters report is fixed, so the gates start clean.
  3. make check runs the same linters, per CI must be a strict superset of the local checks #670's ruling that CI is a strict superset of the local checks.

Plan and design documents

Kind Document
Plan docs/plans/fix/964-ci-lints-neither-markdown.md

Activity

  1. David-Noble-at-work commented on Sep 27, 2026

    @David-Noble-at-work
    ContributorAuthor

    The commit hook lints nothing on a machine that uses a global hooks path (found 2026-09-27).

    • The hook that runs: core.hooksPath is ~/.config/git/hooks, whose pre-commit blocks commits to protected branches and then hands off to $(git rev-parse --git-dir)/hooks/pre-commit. devlore-cli has no such file, in the main clone or in a worktree, so nothing more runs.
    • The hooks that don't: the repository's own .githooks/pre-commit runs only after make dev. .pre-commit-config.yaml runs only where the pre-commit tool is installed, and it isn't on DANOBLE-UD24-1.
    • What they'd lint if reached: neither includes Markdown, Go style, copyright or PowerShell.

    The resolution adds a fourth item: the commit hook, make check and CI run the same linters, and the hook is reached whatever core.hooksPath a machine uses.

  2. David-Noble-at-work commented on Sep 30, 2026

    @David-Noble-at-work
    ContributorAuthor

    Phase 3 refinement, ruled 2026-09-30

    --fix should be done by an engineer after pre-commit fails using make to ensure it runs consistently with
    pre-commit and CI checks.

    The commit hook should not run with --fix. When pre-commit checks fail due to a lint failure, we should
    provide the make command to run to fix the problems you caused.

    This supersedes the third bullet of Phase 3 in
    docs/plans/fix/964-ci-lints-neither-markdown.md,
    which read:

    • The commit hook runs --fix, then refuses the commit when it rewrote anything, so the diff is read
      before it lands, and it is reached whatever core.hooksPath a machine uses

    The hook does not run --fix. It never writes to the tree.

    Caller Runs Effect
    pre-commit hook make lint read-only; refuses the commit and names the command that fixes it
    CI make lint read-only; fails the job
    engineer, by hand, after the hook fails make lint-fix rewrites; the engineer reads the diff and commits it

    Three callers, one code path. That is the point of routing through make rather than calling star lint directly
    in each place: the hook, the workflow and the engineer cannot drift apart, because there is one definition of
    what "lint" means and one of what "fix" means.

    The failure message carries the remedy. A gate that refuses a commit without saying what to run costs the
    engineer a lookup every time, and the thing they look up is the thing most likely to drift from what the gate
    actually ran. The hook prints the make target, not a star lint invocation with flags — the same target the
    engineer would have run anyway, so what they type and what CI runs stay the same string. Shape:

    lint: 14 findings in 3 files.
    
    Fix them with:
        make lint-fix
    
    Then review the diff and stage it. This hook does not modify your tree.
    

    It is also better than the superseded design on its own terms. A hook that rewrites files underneath you
    produces a commit whose content nobody read — the old bullet tried to patch that by refusing the commit after
    rewriting, which leaves a modified working tree the engineer did not ask for and must now reconcile. Failing,
    stopping, and naming the remedy is simpler and has no such state.

    The core.hooksPath clause in the old bullet stands and is now its own issue:
    personal#251 — on Windows that setting names a
    directory the Unix layer alone supplies, so no hook of any kind runs, and a gate added to the hook would be
    silently inert. Phase 3 cannot claim hook coverage until that is fixed.

    The plan document is updated on Phase 3's branch, not before: lane 9 waits on lanes 2, 3 and 8.

  3. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rules it breaks:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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