Repository navigation
Closed
Labels
area/specs.t27 spec files and conformance.t27 spec files and conformanceenhancementNew feature or requestNew feature or requestspec
Description
The lint engine behind the editor's warnings: a registry of rules, each with an id, a severity, a rationale page and (where possible) an automatic fix; profiles that turn groups on and off; and waivers written next to the code they excuse. Verible has 61 rules with exactly this shape; Pyright's basic, standard and strict modes are the dial. t27c lint is the backend and this module must agree with it, not replace it. Part of the LSP epic, Refs #12209 (wave 2, beyond the standard). Only .t27: no code in any other language, not even scratch probes or a loader; see skill only-t27.
Depends on specs/lsp/diagnostics.t27 (delivery) and specs/lsp/code_actions.t27 (fixes).
Prior art:
- Verible lint: 61 rules, rule pages with rationale, waivers by comment, autofix for a subset: https://chipsalliance.github.io/verible/lint.html
- rust-analyzer diagnostics, each with a documented code and a quick fix: https://rust-analyzer.github.io/book/diagnostics.html
- Pyright type-checking modes
basic,standard,strict: https://microsoft.github.io/pyright/ - Slang-server uses the same compiler's diagnostics as its lint: https://hudson-trading.github.io/slang-server/features/features/
Boundary
- specs/lsp/lint.t27
User Scenarios
- Given a rule
unused-constantis in the registry, when a spec has a private constant nobody reads, then a warning with codeunused-constantappears on its name, withcodeDescription.hrefof the rule page and a quick fix that removes it. - Given the line above a finding holds
; lint:allow(unused-constant) kept for the ABI, when diagnostics run, then the finding is suppressed, and a waiver that suppresses nothing is itself reported asunused-waiver. - Given the profile
strict, when the user switches torelaxed, then the rules marked strict-only stop firing and the rest keep their severity. - Given the rule list is generated, when the docs page is built, then every rule has an id, a one-line rationale, a bad example, a good example and the fix status.
- Given the same spec, when
t27c lintand this module both run, then they report the same ids at the same ranges.
Requirements
- FR-001: The module MUST hold the registry as data (id, default severity, profiles, rationale, example pair, fix name or none) with the engine as pure functions over the snapshot and the registry.
- FR-002: The module MUST support profiles
relaxed,standardandstrictand per-rule overrides fromspecs/lsp/config.t27. - FR-003: Waivers MUST be a comment of the exact form
; lint:allow(<id>[, <id>]) <reason>, MUST require a non-empty reason, and an unused or reasonless waiver MUST be reported. - FR-004: Findings MUST be identical to
t27c lintfor the same file; a test compares them on 20 specs, and a rule the compiler lacks is markedserver-onlyin the registry. - FR-005: The rule documentation page MUST be generated from the registry; no rule text lives anywhere else.
Success Criteria
- At least 40 tests in
specs/lsp/lint.t27pass, run on the lab witht27c test-report(exit 0), at least 1 positive and 1 negative test per rule and 1 per profile. - On the lab the agreement test passes on 20 named specs; the command and the list are pasted in the issue.
git diff --name-only masterlists onlyspecs/lsp/lint.t27and generated files named in the issue (0 hand-written files in other languages).
Metadata
Metadata
Assignees
Labels
area/specs.t27 spec files and conformance.t27 spec files and conformanceenhancementNew feature or requestNew feature or requestspec
Activity
gHashTag commentedon Nov 17, 2026
LSP spec created (typecheck OK, tests pass).