Skip to content

feat(lint): annotate PR diffs with every linter's findings #501

Open

Description

@DevSecNinja

Only some linters in the reusable lint.yml show their findings as inline annotations on the PR diff. The owner likes the inline view (see DevSecNinja/ai-toolkit#249, where markdownlint and SkillSpector annotate the changed lines). Every linter should do the same, so findings are visible without opening the job log.

Linter Today Suggested route
golangci-lint annotated (action) –
checkov, Trivy, zizmor annotated through code scanning, public repos only (upload-sarif) private repos: zizmor --format github; Trivy and checkov via a small SARIF → ::error file=,line= step
actionlint log only problem matcher, or -format template emitting ::error file=…,line=…,col=…::…
shellcheck log only -f gcc plus a problem matcher (or -f json → ::error)
yamllint log only built-in -f github
shfmt log only shfmt -l → one ::error file=…::not formatted (run shfmt -w) per file
yamlfmt log only -lint file list → per-file ::error
dprint log only dprint check --list-different → per-file ::error
gitleaks log only --report-format json (redacted) → ::error file=,line= with the rule ID; or SARIF in public repos

Keep it simple: prefer built-in formats and problem matchers over custom scripts. The exit codes and gate behaviour stay the same, and the output must not leak secret values (gitleaks stays --redact).

Done when a deliberate violation for each linter shows an annotation on the PR diff, in both a public and a private caller, with mise run test covering the format plumbing where practical.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions