TODO section 34 (36 -> 54 rules). Options: OptionSpec/OptionKind/OptionValue/RuleOptions in vlog_linter with one validator behind both front ends - [lint.<rule>] tables in lucisv.toml (accepted now; stored raw by lucisv_core::config, resolved per file by the CLI with <config>:<line> on the first bad entry) and the editor's lucisv.lint.options object (bad entries logged and dropped) - precedence editor > toml > default key by key, --rules-doc listing every option. A small anchored regex engine of our own: a Thompson-NFA simulation, linear in pattern x name by construction (QA's first cut found the backtracking matcher exponential on (a*)*b), unknown escapes refused by name through both doors, a 71-row table verified against CPython. The four naming rules take Verible's option spellings with defaults that keep today's verdicts byte-identical. Eighteen Style rules, one file each with true positives and near- misses: line-length (the formatter's width), posix-eof (safe fix), forbid-consecutive-null-statements (safe fix), generate-label and generate-label-prefix, package-filename, one-module-per-file (off), signal/interface/macro/constraint/parameter-type-name-style, port-name-suffix (off), banned-declared-name-patterns (off), typedef-enums, typedef-structs-unions (allow_anonymous_nested defaults true here - opentitan's 3 159 findings were all generated register packages, and its own config disables the rule), always-comb (unsafe fix), explicit-begin (off, Verible's eleven enables). Four rules ask parsed_cleanly() first after a census showed error-recovered UVM files rebound as generate blocks. package.json regenerated (drift test). 3 549 tests / 48 binaries; corpus 814/820 byte-identical; naming-rule finding lists identical to 0.36.0; opentitan check timing unchanged. docs/features/linter-expansion-2/README.md. Co-Authored-By: Claude Fable 5 <[email protected]>
41 lines
685 B
Plaintext
41 lines
685 B
Plaintext
#select explicit-begin
|
|
# an unblocked body is wrapped, and an `else if` chain is not touched
|
|
module m;
|
|
initial begin
|
|
if (a) x = 1;
|
|
//^ 12 explicit-begin
|
|
else if (b) begin
|
|
x = 2;
|
|
end
|
|
end
|
|
endmodule
|
|
----
|
|
module m;
|
|
initial begin
|
|
if (a) begin x = 1; end
|
|
//^ 12 explicit-begin
|
|
else if (b) begin
|
|
x = 2;
|
|
end
|
|
end
|
|
endmodule
|
|
====
|
|
#select explicit-begin
|
|
#options explicit-begin.if_enable = false
|
|
# each construct has its own switch
|
|
module m;
|
|
initial begin
|
|
if (a) x = 1;
|
|
while (b) y = 2;
|
|
//^ 15 explicit-begin
|
|
end
|
|
endmodule
|
|
----
|
|
module m;
|
|
initial begin
|
|
if (a) x = 1;
|
|
while (b) begin y = 2; end
|
|
//^ 15 explicit-begin
|
|
end
|
|
endmodule
|