Skip to content

Lint rules

17 rules indexed

A rule marked on (project) runs by default only where lucisv can see the other files of your project — lucisv check <dir>, or the language server. Over a single file or a stdin buffer it is off and must be --selected, because its one false-positive mode is a use in another file. Turn any rule off with --ignore, with ignore under [lint] in lucisv.toml, or with lucisv.lint.ignore in your editor.

Rule Default Fix Purpose
always-comb-blocking on — Use = inside always_comb
always-ff-non-blocking on — Use <= inside always_ff
case-missing-default on — Give every case a default branch
empty-item on safe Drop a ; that stands where an item belongs
enum-name-style on — Name enum typedefs with _e or _t
explicit-parameter-storage-type on — Declare parameter storage types
module-filename on — Match one-module files to module names
module-name-style off — Use lower_snake_case module names
multiply-driven on (project) — Give variables one driver
no-tabs on safe Use spaces outside string literals
no-trailing-whitespace on safe Remove end-of-line whitespace
parameter-name-style on — Use CamelCase or ALL_CAPS parameters
struct-union-name-style on — Name aggregate typedefs with _t
undriven-net on (project) — Drive signals that are read
unused-signal on (project) — Detect unreferenced internal signals
unused-waiver on — Remove ineffective suppressions
wire-reg-mixup on — Prefer logic to reg in SystemVerilog

Reports non-blocking assignments inside always_comb. Scheduled updates can make later statements observe stale values in simulation. No automatic fix is offered because changing the operator can change behavior.

Reports blocking assignments inside always_ff. Immediate updates can create simulation/synthesis mismatches between registers assigned in one clocked block.

Reports case, casex, and casez statements without default, including unique and priority cases. The correct default action is a design decision.

Reports a lone ; where an item belongs — after endgenerate, after a generate block’s end, after endmodule, or anywhere else in a module, package, interface, program or class body. It is a legal null item (IEEE 1800-2017 A.1.4) that does nothing, almost always a semicolon carried over from a statement context; slang reports the same shape as -Wempty-member. Its safe fix deletes the ;, and the line with it when nothing else stood there; a comment on that line is kept.

Requires typedef enum names to match lower_snake_case ending in _e or _t. Anonymous enums and escaped identifiers are exempt.

Reports parameters without a declared storage type, preventing overrides from silently changing width or signedness. Continuation parameters inherit the opening declaration’s type.

Requires a file containing exactly one module or interface to share its name. Multi-unit files, files with no units, and unnamed stdin are exempt.

Requires lower_snake_case module names. It is opt-in because naming policy is project-specific; escaped identifiers are exempt.

Reports SystemVerilog variables written by multiple sources. Nets are intentionally excluded, as are partial writes, generated alternatives, preprocessor alternatives, initializers, initial blocks, and function/task bodies where the analysis cannot prove a conflict. It never consults the project census — nothing another file does can take an in-file driver away — but it shares the other two rules’ default: on wherever there is a project, off for a single file.

Reports tabs outside string literals. Its safe fix expands each tab using the active indentation width.

Reports whitespace immediately before a line ending. Its safe fix removes the run while leaving string data untouched.

Requires parameter and localparam names to use CamelCase or ALL_CAPS. Item, statement, module-header, and class-header declarations are covered.

Requires typedef struct and typedef union names to use lower_snake_case ending in _t. Anonymous aggregates and escaped identifiers are exempt.

Reports internal signals that are read but never driven. It stays silent for ports, instance/gate connections, task arguments, macros, directives, verbatim or unparsed regions, wildcard connections, and declarations with initializers to avoid false positives — and, over a project, for any name another file writes down, which may be driving it through a hierarchical assignment or a testbench force.

Reports internal nets or variables with no use. Ports, intentionally unused names, and names mentioned anywhere in raw tokens are excluded — and, over a project, any name another file writes down, since cross-file hierarchy can establish uses a single-file analysis cannot see. That is why the rule runs by default over a directory and stays off for one file.

Reports malformed, unknown, or ineffective waiver comments when their target rule is enabled. A waiver for a disabled rule is not judged.

Reports reg in .sv and .svh files and recommends logic. Verilog .v/.vh files and unnamed stdin are exempt; wire remains valid and is never flagged.