36 KiB
lint-rules-2
Goal
Finish the practical rule set linter-core started, inside vlog_linter
only. Three things ship: (1) visit.rs now walks class bodies, which
closes the handshake docs/features/classes/README.md filed — the four
AST-walking rules stopped at endclass and now do not; (2) five new rules —
four naming rules with built-in style presets and no regex dependency,
plus wire-reg-mixup, the SystemVerilog-ness decision the linter-core round
parked; (3) vlog_linter::rules_markdown(), a rule reference generated from
the registry so the docs cannot drift from the rules (Verible's
--generate_markdown, ruff's generated rule pages). Everything slots into the
existing registry, so lucisv check, --select/--ignore and lucisv-server's
diagnostics pick the new rules up with zero wiring — verified live, not
assumed.
Assumptions
- A class body is an ordinary scope.
ItemKind::Class'sitemsare walked exactly like a module's, so every AST rule sees class properties, class localparams, class typedefs and class methods. Nothing about a rule is class-aware; the walk is what changed. - Naming presets are fixed per rule this round. Verible spells its
conventions as RE2 patterns and lets you override them; lucisv spells the same
conventions as character-class predicates (
src/naming.rs) and does not let you override them yet. Per-rule style configuration needs thelintkey inlucisv.toml, which is still parked (see Handshakes). - Escaped identifiers (
\my$name) are exempt from every naming rule. Their whole purpose is to carry characters no convention allows. - A name's style is judged on ASCII. A non-ASCII identifier fails
lower_snake_caseetc. and is reported. Verilog identifiers are ASCII by the standard (outside escaped ones, which are exempt), so this has no practical population. wire-reg-mixupdecides SystemVerilog-ness from the file extension alone —.sv/.svh, compared case-insensitively. Not from content, not from a config key, and never for a buffer with no name:lucisv check -without--stdin-filenameis silent. This is the whole SV-ness decision, deliberately: any content heuristic ("it useslogic, so it's SV") would make the rule's own subject its input.wire-reg-mixupreads tokens, not the tree, so a file that does not parse is still checked, and areginside aconstraint/covergroupverbatim block is still seen. Areginside a`definebody is not: a directive is oneTokenKind::Directivetoken and its body is never lexed as keywords. Consistent with lucisv's no-preprocessing stance.rules_markdown()'s "Fix" column is declarative metadata (Rule::fix()), not derived from running the rules. A unit test probes the rules against a file that trips every fixable one and asserts the two agree, which catches the drift direction that matters (a rule gains a fix and forgets to declare it) for any rule that fires on that probe.
Handshakes
Consumed (all unchanged from linter-core)
vlog_parser:ast::{ItemKind::Class, ClassDecl, ParamPort, Typedef, TypedefKind, StructType},token::{Token, TokenKind},span::TextRange. New this round is only that the class arm ofItemKindis now read.StructType::kwis read for thestruct/unionword in a message.- Nothing else.
cargo tree -p vlog_linteris stillvlog_parser+ std — no new dependency, which is also the naming rules' central design decision (below).
Promised
- Three new public items:
rules_markdown(), and two new methods on theRuletrait,default_on()(defaults totrue) andfix()(defaults toNone). Both have defaults, so an out-of-crate implementor ofRule— if there ever is one — is not broken by them. default_rules()is no longerall_rules(): it filters ondefault_on(). Callers are unaffected (crates/lucisvcallsselect_rules,crates/lucisv_server/src/lint.rscallsdefault_rules()); both keep compiling and keep meaning what they meant.- Rule names are stable API — they appear in users' waivers. The five new
names are
enum-name-style,module-name-style,parameter-name-style,struct-union-name-style,wire-reg-mixup. Four of the five are spelled exactly as Verible spells its equivalent, on purpose: a codebase already annotated// verilog_lint: waive enum-name-styleis honored by lucisv unedited.
Requested of others (not done here)
crates/lucisv's owner (concurrent this round): alucisv check --rules-docflag that printsvlog_linter::rules_markdown()to stdout and exits 0. Oneprintln!; no other wiring. Until then the same output is available ascargo run -p vlog_linter --example rules_markdown.- config-discovery's owner: the
lintkey inlucisv.tomlis what per-rule naming-style configuration waits on — the shape wanted is[lint.parameter-name-style] style = "CamelCase"picking one of the named presets, not a regex. Restated fromlinter-core, unchanged. - No request to
vlog_formatter,vlog_semantic,lucisv_serverorlucisv_core; none of them was touched.
Status / TODO
visit.rswalksItemKind::Classbodies — the classes handshake.visit.rs::walk_param_ports— module and class header#( ... )parameter ports, shared by the two parameter rules.src/naming.rs:lower_snake_case,UPPER_SNAKE_CASE,CamelCasepredicates + escaped-identifier exemption, no regex dependency.parameter-name-style(default on).enum-name-style(default on).struct-union-name-style(default on).module-name-style(default off — see the defaults table).wire-reg-mixup(default on).Rule::default_on()+Rule::fix();default_rules()filters.rules_markdown()+ golden shape test + "every rule appears" test + fix-metadata consistency test.examples/rules_markdown.rsso the reference is renderable today.- Violating/clean/waived/unused-waiver quartets for all five new rules; class-body coverage tests for all four original AST rules.
- Corpus baseline re-run, before/after per rule.
- Per-rule style configuration — needs the
lucisv.tomllintkey. lucisv check --rules-doc—crates/lucisv, handshake above.- Parked naming rules, listed with their Verible names below.
- External waiver files — untouched, still
linter-core's open item.
Rules shipped, and where each default comes from
Verible's own rule list was checked against https://chipsalliance.github.io/verible/lint.html rather than recalled. That check changed two decisions, both recorded honestly below.
| Rule | Default | Verible equivalent | Verible's default |
|---|---|---|---|
parameter-name-style |
on | parameter-name-style |
enabled |
enum-name-style |
on | enum-name-style |
enabled |
struct-union-name-style |
on | struct-union-name-style |
enabled |
module-name-style |
off | none — no such rule | — |
wire-reg-mixup |
on | none — no such rule | — |
parameter-name-style — accepts CamelCase or ALL_CAPS for both
parameter and localparam. Verible's defaults are parameter_style: CamelCase|ALL_CAPS and localparam_style: CamelCase, i.e. stricter for
localparam. lucisv accepts the union for both, deliberately: matching
Verible's localparam default would flag localparam int ADDR_W — an
overwhelmingly common spelling — in a rule that is on by default, and lucisv
has no per-rule config key yet to relax it with. When that key lands, the
strict split is the natural first setting to offer. Covers item- and
statement-level declarations and the #( ... ) ports of module and class
headers; type parameters are skipped (they name a type, which is Verible's
separate parameter-type-name-style, parked).
enum-name-style — Verible's default pattern is literally
[a-z_0-9]+(_t|_e); lucisv checks lower_snake_case ending in _e or _t,
the same shape. Only typedef enum is judged: an anonymous enum has no name,
and requiring the typedef is Verible's separate typedef-enums (parked).
struct-union-name-style — Verible requires lower_snake_case ending in
_t for struct and union; lucisv checks the same. Only typedef struct /
typedef union; requiring the typedef is Verible's typedef-structs-unions
(parked).
module-name-style ships OFF, which is a deliberate deviation from the
round's brief. The brief said "snake_case default-on per Verible".
Verible has no module-name-style rule at all — the documentation check
above is explicit about it, and the nearest things it does have are
module-filename (enabled by default, which lucisv already implements) and
interface-name-style for the sibling construct. The instruction for this
round was to default a naming rule on only where Verible defaults its
equivalent on, and there is no equivalent to inherit a default from, so the
rule ships selectable but quiet: lucisv check --select module-name-style.
The rationale in Rule::doc cites the lowRISC/Google SystemVerilog style
guide, which does require lower_snake_case for module names. Flipping it on
is a one-line change (fn default_on) if the lead prefers the brief's
reading; the corpus evidence (one finding over 860 files) says it would
be quiet either way.
wire-reg-mixup ships ON, and TODO.md's provenance note for it is wrong.
TODO §4 lists it under "all from Verible's default set"; Verible has no
wire/reg rule of any kind. It ships on anyway because it is an explicitly
requested seed rule, because the corpus says it is silent on real
SystemVerilog (0 findings over 860 files, see below), and because its
rationale stands on IEEE 1800 (logic and reg are the same type) and the
lowRISC style guide's "use logic" without needing Verible. The README is
the place that record lives; TODO.md's item text is left intact per
CLAUDE.md.
What wire-reg-mixup deliberately does not flag:
wireitself. A net is a distinct kind of object in SystemVerilog too, andwire x = expr;is a perfectly good continuous assignment. Flaggingwirewould be a house-style opinion, not a mixup.- Anything in a
.v/.vhfile, or in a nameless stdin buffer.regis Verilog's spelling; the rule has no opinion about Verilog. reginside a`definebody, which is never lexed as a keyword.- It offers no fix, though
reg→logicwould be a meaning-preserving one in SystemVerilog. Aregin a.svfile is usually a symptom of code carried over wholesale, and the repair worth making is bigger than the keyword. A Safe fix is the obvious follow-up if the corpus ever grows a population for it.
Parked, with their Verible names
Listed so the next round does not have to rediscover them:
signal-name-style (Verible: off by default), interface-name-style,
constraint-name-style, macro-name-style, parameter-type-name-style,
create-object-name-style, port-name-suffix, dff-name-style,
typedef-enums, typedef-structs-unions, package-filename.
genvar-name-style is parked too and is not a Verible rule: genvars are
conventionally one-letter (i, j) or gen_*, and no preset here has
anything useful to say about i.
Why no regex dependency
Verible spells naming conventions as RE2 patterns. lucisv spells them as three
character-class predicates in src/naming.rs, roughly 20 lines:
lower_snake_case first char [a-z], then [a-z0-9_]
UPPER_SNAKE_CASE first char [A-Z], then [A-Z0-9_]
CamelCase first char [A-Z], then [A-Za-z0-9] (no underscore)
The justification CLAUDE.md asks for, in full: every preset anyone actually
uses is "these character classes, in this order". A regex crate would buy
user-supplied patterns — which this round explicitly does not ship, because
they need a config key that does not exist — at the cost of the crate's only
real property, that cargo tree -p vlog_linter is vlog_parser + std. When
the lint key lands, the setting it should offer is a named preset, not
a pattern: "no option explosion" is TODO §7, and a regex field in a config
file is the option explosion of naming rules. A lower-first camelCase
predicate was specified for this round and deliberately not written: no
rule needs it, and an unused predicate is an abstraction for a second user
that does not exist.
Class-body coverage: what changed and what it found
One arm in visit.rs::items():
ItemKind::Class(class) => items(&class.items, f),
plus walk_param_ports, which yields the #( ... ) parameter ports of both
module and class headers and is now what both parameter rules use (previously
explicit-parameter-storage-type inlined a module-only version).
All four originally-AST-walking rules were verified firing inside a class body by test, not by inspection:
| Rule | Class-body test |
|---|---|
case-missing-default |
case_missing_default_reaches_a_class_method |
explicit-parameter-storage-type |
explicit_parameter_storage_type_reaches_a_class_body_and_header, a_class_inside_a_module_is_reached_too |
always-comb-blocking |
the_always_rules_reach_a_class_body_too |
always-ff-non-blocking |
the_always_rules_reach_a_class_body_too |
Honest caveat on the last two: SystemVerilog forbids an always block
inside a class, so that test pins walk uniformity, not a real-world
population. The tolerant parser accepts the shape and the rules fire on it;
in real code these two rules gain nothing from this change, and the corpus
agrees (both deltas are 0).
Corpus baseline
860 files (corpus/: ibex, opentitan, picorv32, common_cells), read-only,
0.08–0.09 s wall on 10 cores. Byte-identical across repeated runs and between
--threads 1 and the default pool.
Before is this working tree at the start of the round, not the number in
docs/features/linter-core/README.md: the concurrent classes/parser work has
already moved what parses, so linter-core's 7806/93 no longer reproduces here
(it reads 7875/88 before any of this round's changes). Comparing against a
stale number would misattribute someone else's delta to this round.
| Rule | Before | After | Δ | Files after | Cause of Δ |
|---|---|---|---|---|---|
no-tabs |
7527 | 7527 | 0 | 45 | — |
explicit-parameter-storage-type |
182 | 183 | +1 | 51 | class-body walk |
no-trailing-whitespace |
85 | 85 | 0 | 7 | — |
case-missing-default |
60 | 65 | +5 | 21 | class-body walk |
parameter-name-style |
— | 39 | +39 | 11 | new rule |
module-filename |
17 | 17 | 0 | 17 | — |
always-ff-non-blocking |
4 | 4 | 0 | 1 | — |
struct-union-name-style |
— | 1 | +1 | 1 | new rule |
always-comb-blocking |
0 | 0 | 0 | 0 | — |
enum-name-style |
— | 0 | 0 | 0 | new rule |
wire-reg-mixup |
— | 0 | 0 | 0 | new rule |
unused-waiver |
0 | 0 | 0 | 0 | — |
| default-rule total | 7875 | 7921 | +46 | 96 files | |
module-name-style (off) |
— | 1 | — | 1 | new rule, --select |
Read honestly:
- Nothing was lost. Diffing the two runs by
(file, rule, byte range): 46 findings appear, 0 disappear. The change is purely additive, which is what an added walk arm should be. - The class-body growth is +6 findings in 4 files, all DV code, exactly as
predicted. The five new
case-missing-defaultarecasestatements in UVM scoreboards/sequences (opentitan/hw/ip/uart/dv/env/uart_scoreboard.sv×3,uart_intr_vseq.sv,ibex/dv/uvm/core_ibex/tests/core_ibex_test_lib.sv); the one newexplicit-parameter-storage-typeislocalparam BusWidth = 32;inside a class inibex_icache_scoreboard.sv. These are new findings, not new violations — the code always looked like this; the linter could not see it. parameter-name-style's 39 are concentrated in testbenches and picorv32 (14 inpicorv32.v, 9 inspiflash.v, the rest ≤3 per file), and every one is alower_snake_caseconstant. Synthesizable lowRISC RTL is essentially clean, which is the point: it is written to the style guide this rule encodes.enum-name-stylescoring 0 was checked, not assumed. A separate scan found 166typedef enumnames in the corpus's.sv/.svhfiles and 0 of them violate[a-z_0-9]+(_t|_e). The rule is silent because the corpus conforms.wire-reg-mixupscoring 0 was checked the same way, and this one needed proving because a silent rule and a broken rule look identical. The corpus's.sv/.svhfiles contain noregat all, whilepicorv32.vis full of them. Copyingpicorv32.vtopicorv32.svand re-running gives 209 findings; the identical bytes as.vgive 0. The extension gate works and the rule works.module-name-style's single finding iscommon_cells/src/deprecated/generic_LFSR_8bit.sv— in a directory nameddeprecated. That is the entire population over 860 files, which is why its default costs nothing either way.
The generated rule reference
vlog_linter::rules_markdown() -> String renders the whole registry as one
markdown document — 139 lines today. Shape:
# lucisv lint rules
Generated from the rule registry by `vlog_linter::rules_markdown` — do not edit by hand.
A rule marked **default** runs for a plain `lucisv check`; the others need `--select <name>`. ...
| Rule | Default | Fix |
|---|---|---|
| [`always-comb-blocking`](#always-comb-blocking) | **on** | none |
...
| [`module-name-style`](#module-name-style) | off | none |
| [`no-tabs`](#no-tabs) | **on** | safe |
...
## always-comb-blocking
Assign with `=` inside always_comb.
- Default: **on**
- Fix: none
A non-blocking assignment in a combinational block schedules its update ...
An index table (name → anchor, default, fix applicability) followed by one
## section per rule carrying the capitalized summary, the two metadata
lines and Rule::doc verbatim. Nothing is written per rule outside the rule's
own source, which is the whole point: the reference cannot drift.
Three tests hold it:
every_registered_rule_appears_with_its_summary_and_doc— iteratesall_rules()and asserts each name, summary and doc text is present. A new rule that forgets the docs cannot exist.the_document_shape_is_pinned— the golden test: the first eight lines verbatim, plus the exact per-rule section template rendered from the first registered rule and asserted to appear. It pins the shape, not the prose, so improving a rule'sdocdoes not churn a snapshot.declared_fix_metadata_matches_what_the_rules_return— the drift guard described in Assumptions.
cargo run -p vlog_linter --example rules_markdown prints it today; the
lucisv check --rules-doc flag is filed as a handshake because crates/lucisv
belongs to a concurrent agent this round.
Zero-wiring claim, verified
The claim that a new rule needs no wiring outside the registry was checked by running the built binary, not by reading the code:
lucisv check corpus/reports the four new default-on rules with no CLI change (the table above is that run).lucisv check ... --select module-name-styleruns an off-by-default rule, and--select wire-reg-mixupan on-by-default one; both were used to produce numbers above.--ignore <new-rule>and// lucisv: waive <new-rule>work by construction (they key onrule_by_name), and each new rule has a waiver test.crates/lucisv_server/src/lint.rswas read read-only: it callsdefault_rules()with no filtering of its own, so the four new default-on rules appear as editor diagnostics automatically, andmodule-name-stylecorrectly does not.cargo test -p lucisv_serverstays green.
Work log
2026-08-19 — dev
- Verified Verible's rule set against its documentation instead of
recalling it, which changed two of the round's stated decisions:
Verible has no
module-name-style, nogenvar-name-styleand no wire/reg rule, somodule-name-styleships default-off (deviation from the brief, argued above) andwire-reg-mixup's "it's Verible-default" provenance is recorded as incorrect while the rule still ships on. Also confirmed the exact default patterns now implemented:[a-z_0-9]+(_t|_e)for enums,lower_snake_case+_tfor structs/unions, and theCamelCase/CamelCase|ALL_CAPSsplit for parameters. - Named the typedef rules after Verible's two rules (
enum-name-style,struct-union-name-style) rather than inventing onetypedef-name-style. Rule names are what appear in users' waivers, so matching Verible's spelling means a// verilog_lint: waive enum-name-stylealready in vendored code is honored instead of ignored. Typedef aliases (typedef logic [7:0] x;) are judged by neither, matching Verible. visit.rs: one arm forItemKind::Class, pluswalk_param_portsso the two parameter rules share one answer for "every#( ... )port" —explicit-parameter-storage-typewas rewritten onto it, which also gave it class-header parameter ports (0 additional corpus findings; the class headers in this corpus are alltypeparameters or typed).Rulegaineddefault_on()andfix(), both with defaults so no existing rule file had to change except the two that offer fixes.default_rules()filters on the former. The one off-by-default rule is what keeps that mechanism from being a phantom: the registry test asserts the default set is a strict subset, so it cannot silently become "all of them" again.rules_markdown()lives in its own module rather than inregistry.rs: the registry is about selecting rules, and rendering has three tests of its own.- Test counts:
vlog_linter116 unit (was 71) + 55 inline-marker integration (was 30) + 1 doctest, all green. New: 5 quartets, 4 class-body reach tests, 3 walk tests, 5 naming-predicate tests, 4 rule-doc tests, 2 registry default-set tests, and the per-rule unit tests in each new rule file. - Gates:
cargo test -p vlog_lintergreen (116/55/1);cargo test --workspacegreen;cargo clippy -p vlog_linter --all-targetssilent;cargo fmt -p vlog_linter --checkclean. The workspace has one clippy warning (methods called from_* usually take no self) and onecargo fmt --checkdiff, both incrates/vlog_formatter— the concurrent agent's churn, untouched here. - Scope: files changed are
crates/vlog_linter/**, this README, andTODO.md§4 checkboxes.crates/lucisv,lucisv_server,vlog_parser,vlog_formatter,vlog_semanticandlucisv_corewere not modified;lucisv_server/src/lint.rswas read only. - TODO.md §4: checked the naming-rules item (with the "styles are fixed
presets, configuration waits on the
lintkey" caveat spelled out) and the--generate_markdownitem; checked thewire/regsub-item of the seed rules. Left external waiver files, thelintconfig key and "one parse, two tools" unchecked.
QA log
2026-08-19 — QA
Scope: -p vlog_linter only, plus a read-only look at crates/lucisv/src/lint.rs
and crates/lucisv_server/src/lint.rs for the wiring/fence claims. Did not touch
vlog_formatter, lucisv_server, vlog_parser or vlog_semantic (concurrent
this round). All six claims verified; no corpus regression; no preset false
positive/negative found. Two documentation-gap findings, no functional bugs.
Gates — cargo test -p vlog_linter: 116 unit + 55 inline-marker + 1
doctest, all green, exact match to the claimed counts. cargo clippy -p vlog_linter --all-targets: silent. cargo fmt -p vlog_linter --check: clean.
cargo tree -p vlog_linter: vlog_parser + std, no new dependency. Bonus:
cargo clippy --workspace --all-targets and cargo fmt --all --check are
both silent right now — the "1 clippy warning + 1 fmt diff in
vlog_formatter" the work log flags as the concurrent agent's churn is not
present in the tree as I found it (their round must have landed since the
work log entry was written); not this feature's concern either way.
Verible citations, checked against the live page, not just the README's
claim — fetched https://chipsalliance.github.io/verible/lint.html
independently. parameter-name-style: enabled by default, parameter_style
default CamelCase|ALL_CAPS, localparam_style default CamelCase — matches
the README's claim of a deliberate union-not-split deviation. enum-name-style:
enabled by default, pattern [a-z_0-9]+(_t|_e) — exact match. struct-union- name-style: enabled by default, lower_snake_case ending _t — exact match.
No module-name-style, no genvar-name-style, no wire/reg rule of any kind —
all three "no such rule" claims confirmed independently. Claim 1: pass,
externally verified, not just internally consistent.
visit.rs / class-body walk (claim 2) — cargo test -p vlog_linter
includes all the class-body reach tests named in the README and they pass.
Additionally probed live: parameter-name-style fires on a class header
#(parameter int bad_name = 1) (walk_param_ports), case-missing-default
fires on a case inside a class method. Pass.
Corpus (claim 3) — reproduced deterministically.
- After: built
lucisv --releaseat the current working tree, ranlucisv check corpus/ --output-format json. Total 7921, 96 files, and the per-rule breakdown (no-tabs 7527/45, explicit-parameter-storage-type 183/51, no-trailing-whitespace 85/7, case-missing-default 65/21, parameter-name-style 39/11, module-filename 17/17, always-ff-non-blocking 4/1, struct-union-name-style 1/1) matches the README's table exactly, cell for cell. - Before: rather than trust the README's number, rebuilt it independently
with
git worktree add <scratch> HEAD(last commit, before this round'svlog_linterchanges) and ran the same corpus check there: 7875, 88 files, breakdown (no-tabs 7527/45, explicit-parameter-storage-type 182/50, no-trailing-whitespace 85/7, case-missing-default 60/18, module-filename 17/17, always-ff-non-blocking 4/1) — an exact match to the README's claimed "before", which is itself notlinter-core's stale 7806/93 (confirming the attribution reasoning: HEAD already carries the concurrent classes/parser round's commits). - Diffed both JSON dumps by
(filename, rule, range.start, range.end): 46 appeared, 0 disappeared — purely additive, exact match, broken down identically to the README (case-missing-default +5, parameter-name-style +39, struct-union-name-style +1, explicit-parameter-storage-type +1). --select module-name-style: 1 finding,common_cells/src/deprecated/generic_LFSR_8bit.sv— exact match.- Proven zero #1: extracted every
typedef enum ... name;in the corpus's.sv/.svhwith an independent regex scan (not the linter) — 166 names, 0 violate[a-z_0-9]+(_t|_e). Matches the claimed 166/0 exactly. - Proven zero #2:
lucisv check corpus/picorv32/picorv32.v --select wire-reg-mixup→ 0. Copied the identical bytes topicorv32.svin the scratchpad and re-ran → 209. Matches exactly. - Claim 3: pass, every number reproduced independently and exactly, not just re-read from the README.
Zero-wiring (claim 4) — lucisv check <file> --select nope lists all
13 known rules in its error, alphabetical, as registry.rs's own test
already pins. crates/lucisv_server/src/lint.rs read (not modified): both call
sites use default_rules() unfiltered, so the four new default-on rules and
not module-name-style reach server diagnostics automatically, by
construction. Pass.
Attack probes — preset predicates (crates/vlog_linter/src/naming.rs):
Camel_Case (mixed) → flagged by parameter-name-style (fails both
presets, correct). ALL_CAPS2 (digit suffix) → accepted (correct, digits are
in the ALL_CAPS character class). _WIDTH (leading underscore) → flagged
(correct, starts_with requires an uppercase first char). N
(single letter) → accepted (correct, passes both presets trivially, matches
the doc). weird_E (uppercase suffix) → flagged (_e/_t check is
case-sensitive on the suffix, matches the documented pattern shape).
weird_t/weird_e → accepted. foo_t → accepted, foo_s → flagged
(_e-suffixed name is correctly not exempted from struct's _t
requirement). Escaped identifier \weird+name as a parameter name → the file
parses cleanly (confirmed via the unrelated module-filename rule still
firing on the same file) and parameter-name-style is silent on it, i.e. the
exemption is is_escaped working, not a parse failure hiding it. No panics
anywhere. Pass, with one documentation nit below.
Attack probes — wire-reg-mixup scoping: .sv fires, .svh fires
(case-insensitive extension check confirmed via .SV too, in the existing
unit tests), .v silent, stdin without --stdin-filename silent, stdin
with --stdin-filename x.sv fires. reg inside a class body in a .sv
file fires. reg inside a string literal ("reg in a string") and inside a
leading comment do not false-positive — confirmed live, not just by
reading the token-kind filter. Pass.
Attack probes — class-body coverage and the fence/waiver asymmetry:
// lucisv: waive case-missing-default inside a class method body suppresses
the finding — confirmed live. The fence question (does // lucisv: off inside
a class body protect a --fix edit, given the classes round found the
formatter's own scan_nested inactive there) — built a probe file with a
tab fenced inside a class body:
class c;
// lucisv: off
int a;
// lucisv: on
endclass
lucisv check --select no-tabs still reports the tab (fences gate fixes,
not diagnostics — confirmed, not assumed). lucisv check --select no-tabs --fix on the same file leaves the tab untouched — the fix is correctly
declined. lucisv format on the identical file, no --fix, silently
reformats the tab away, exactly reproducing the classes round's finding that
the formatter's own fence is inactive there. Read fence::protected_regions
(crates/vlog_formatter/src/fence.rs:96) to understand why these two
disagree: it is collect (the AST/scan_nested-based answer, which does not
recurse into class bodies, per the classes README) unioned with
scanned_regions (a pure line-based text scan with no notion of scope at
all, fence.rs:124) — the backstop exists for "the broken files only the
linter and the server see" but it fires unconditionally, so it also catches
a fence the AST scan missed. That is a real, confirmed mechanism, not a
guess — and it means --fix is more conservative inside a class body than
the formatter itself is, which is the harmless direction but is currently
undocumented in both docs/features/classes/README.md and this README.
Filed as a should-fix below. Pass on behavior; documentation gap found.
Sabotage — broke is_upper_snake_case in naming.rs to accept any
uppercase-first alphanumeric-or-underscore name (i.e. "Width" would wrongly
pass as ALL_CAPS). cargo test -p vlog_linter: exactly one test failed,
naming::tests::upper_snake_case_accepts_what_parameters_write (the negative
case "Width"). No parameter-name-style test caught it, because every
mixed-case name in that rule's own test file already happens to be valid
CamelCase regardless of the ALL_CAPS predicate, so the coverage for this
predicate lives only in naming.rs's own unit tests — which is sufficient
(the failure is unambiguous and points straight at the broken predicate) but
worth knowing if a future preset gets a fourth caller. Reverted; cargo test -p vlog_linter green again; git diff -- crates/vlog_linter/src/naming.rs
empty, confirmed byte-identical to the pre-sabotage state.
Findings
- Should-fix, documentation gap (not a corruption, not a corpus regression;
the actual behavior is the safe/conservative direction). Neither
docs/features/classes/README.mdnor this README states that a// lucisv: offfence inside a class body does protectlucisv check --fix(viafence::protected_regions's line-based backstop scan), even though the classes round documented, correctly, that the same fence is inactive forlucisv formatitself (the AST-scopedscan_nesteddoesn't recurse into class items). Both facts are true and now confirmed by test; neither README says both in one place, so a reader of either document alone would reasonably conclude the fence does nothing at all inside a class body, which is false for the--fixpath. Suggest a short paragraph in this README's "Class-body coverage" section (or a line indocs/features/classes/README.md's existing fence-inactive note) stating the asymmetry plainly, with the mechanism (collectvsscanned_regions) named. Not fixed directly — it's a cross-cutting note that belongs to whichever agent ownscrates/lucisv/src/lint.rs/ the fence handshake, not a typo I can fix unambiguously in-place. - Minor nit, not blocking. The Assumptions section says "A non-ASCII
identifier fails
lower_snake_caseetc. and is reported." In practice a genuinely non-ASCII byte in an identifier does not reach any naming rule at all:vlog_linter::context's own comment says "a lex error leaves no tokens (the lexer is all-or-nothing)", confirmed live —lucisv checkon a file containingparameter int élan = 1;exits 0 with zero findings (not even the unrelatedmodule-filename), whilelucisv formaton the same file correctly refuses with alex error(invariant intact, nothing corrupted). So the practical claim is even truer than stated ("no practical population" because it's unreachable, not just because it's rare) but the wording "is reported" is not literally accurate for that case — pre-existingcontext.rsbehavior, not introduced by this round, not worth a code change, just a one-clause wording fix if the README is touched again. (2026-08-19: delivered by lexer-cleanup —lucisv checkon a file that does not lex now reports the lex error and exits 2 instead of silently passing;docs/features/lexer-cleanup/README.md.) - No preset false positive or false negative found on any probed shape. No panic on escaped, non-ASCII, or unparseable input. No corpus regression: diff is exactly and only additive.
Verdict: all six claims pass. Nothing blocking. Two documentation gaps filed above, both pre-existing/cross-cutting rather than owned by this round's code.
Review
2026-08-19 — lead. Verdict: accepted; commits with round 18. The linter now stands at 13 rules with Verible-compatible names and evidence-based defaults.
Points reviewed and accepted:
- Both brief premises were falsified against Verible's published docs and the deviations argued: module-name-style ships OFF because no Verible default exists to inherit (my brief said on — the agent was right to override it with the round's own default-rule); wire-reg-mixup's provenance correction is recorded where the wrong claim lives. Checking the source instead of trusting the brief is exactly what the house rewards, and QA independently re-fetched the docs to confirm.
- Using Verible's exact rule names (enum-name-style,
struct-union-name-style) instead of an invented umbrella means
vendored
verilog_lint:waivers now suppress instead of being ignored — compatibility as a design input, not an afterthought. - The class-body walk closes the classes handshake with honest deltas (+6 findings, all real UVM code; always-* uniformity noted as population-free) and the corpus baseline correctly re-measured on this tree rather than inherited stale.
- Both zeroes proven (166 conforming enums; the .v→.sv rename yielding 209) — a zero you've probed is evidence; a zero you assumed is a blind spot.
- QA's fence-asymmetry finding is now documented in both owning READMEs (lead notes in classes and shared-fence-filter): a fence inside a class body protects fixes via the scan backstop even though the formatter ignores it there. The non-ASCII lexing nit belongs to the lexer's existing gap list.
Remaining §4 items stay honestly open: external waiver files, per-rule style configuration (needs the lucisv.toml lint key), and the --rules-doc CLI flag (handshake filed; rules_markdown() is ready).