Files
lucisv/crates/vlog_linter/src/rules/mod.rs
T
lucioandClaude Fable 5 307a56e921 Null items: the semicolon after endgenerate, and everywhere else an item may stand
Owner report: 'for loop inside generate shows expected item (found ;) at
endgenerate;'. Lead diagnosis before dispatch: every generate-for spelling
and three systemverilog.io examples already parsed; the failing token was
the lone ';' - IEEE 1800-2017 A.1.4's null item, legal in module,
generate, package, interface, program and class scope and at file scope,
rejected by lucisv in all of them.

ItemKind::Empty, one branch at the top of parse_item_kind, the three
exhaustive arms topo 3.3 predicts and no others. The formatter keeps the
';' where it was written - glued to the previous sibling's line
(endgenerate; end; endmodule; ;;) when no newline separates them and the
';' carries no docs of its own, else on a line of its own - decided from
src spans in item_seq rather than a parser flag. verify.rs untouched,
eight attack pairs. New empty-item lint (slang's -Wempty-member) with a
safe fix whose deletion range structurally cannot swallow a comment.

Corpus byte-identical at 813/820 against the pre-change binary; opentitan
sweep identical file-for-file; empty-item fires zero times there. The LSP
now publishes a warning with a quick fix where it used to publish a parse
error.

docs/features/null-items/README.md; TODO.md section 14.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-09-01 15:01:33 -07:00

25 lines
754 B
Rust

//! The rules themselves, one module each.
//!
//! Most rules are **syntactic** — text, tokens or tree shape. The three that
//! are not (`unused-signal`, `undriven-net`, `multiply-driven`) read the
//! symbol table through `crate::signals`; see
//! `docs/features/semantic-lints/README.md`.
pub mod always_comb_blocking;
pub mod always_ff_non_blocking;
pub mod case_missing_default;
pub mod empty_item;
pub mod enum_name_style;
pub mod explicit_parameter_storage_type;
pub mod module_filename;
pub mod module_name_style;
pub mod multiply_driven;
pub mod no_tabs;
pub mod no_trailing_whitespace;
pub mod parameter_name_style;
pub mod struct_union_name_style;
pub mod undriven_net;
pub mod unused_signal;
pub mod unused_waiver;
pub mod wire_reg_mixup;