Skip to content

--lint: per-file allow-list in eigs.json (residual of #399) #455

Description

@InauguralPhysicist

Residual scope split out of #399, whose core landed in #428: --lint-level error|warning and inline # lint: allow W0xx suppression both work today (src/main.c flag parsing, src/lint.c exit-code policy).

What's left

The third #399 mechanism: a per-file allow-list in eigs.json, so a project can suppress a lint code for a whole file (e.g. generated code, a vendored module) without sprinkling inline # lint: allow comments on every hit.

Sketch:

{
  "lint": {
    "allow": {
      "lib/generated_tables.eigs": ["W003", "W015"]
    }
  }
}
  • Resolution should reuse the existing project-root discovery (the walk that finds eigs.json for eigs_modules resolution) so the allow-list applies regardless of the cwd the linter runs from.
  • Paths are project-root-relative; a code allowed for a file is filtered exactly like an inline # lint: allow for that code.
  • --lint --json output should still include suppressed count metadata if that's cheap, so CI can see what's being hidden.

Why good-first-issue

Self-contained in src/lint.c (+ a small JSON read; there's already an eigs.json reader for module resolution), with an obvious mechanical test: a fixture project where the same file fails --lint without the allow entry and passes with it. This is the intended contributor on-ramp #399 described.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions