docs: repository analysis audit at v0.41.0 — README architecture, topo facts (codec 17, handshakes 26–28), site guides and rebuilt dist
Written by the owner's audit process on 2026-09-04; committed by the lead unchanged. Findings 1–3 are planned as TODO §41–§43. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
d5abf81563
commit
f6f18de10d
49 files changed
+1262
-149
No files matched your search
@@ -2,6 +2,12 @@
|
||||
|
||||
A Verilog and SystemVerilog formatter, linter, and language server written in Rust.
|
||||
|
||||
Start with the [repository analysis](docs/repository-analysis.md) for a code-based
|
||||
assessment and [dependency topology](docs/topo.md) for interfaces and change
|
||||
impact. The [documentation site source](docs/site/README.md) contains usage
|
||||
guides and references; [CHANGELOG.md](CHANGELOG.md) records releases, and
|
||||
[TODO.md](TODO.md) tracks work in progress.
|
||||
|
||||
An opinionated, fast formatter and linter for Verilog-2001 and SystemVerilog
|
||||
RTL, built in the image of [ruff](https://github.com/astral-sh/ruff), with
|
||||
layout conventions and lint ergonomics borrowed from
|
||||
@@ -160,9 +166,9 @@ with a file that sets only `line-length` uses both). `exclude` is the
|
||||
exception: config patterns are *added* to `--exclude`, not replaced by it.
|
||||
|
||||
An unknown key, a bad value, an out-of-range number, or any TOML beyond the
|
||||
supported subset (tables other than `[lint]`, multi-line arrays, string
|
||||
escapes) is a hard error naming the file and line — exit 2, with nothing
|
||||
written. This is deliberate:
|
||||
supported subset (tables other than `[lint]` and `[lint.<rule>]`, multi-line
|
||||
arrays, unsupported string escapes) is a hard error naming the file and
|
||||
line — exit 2, with nothing written. This is deliberate:
|
||||
a silently ignored `line_length` typo costs more than a strict parser does.
|
||||
|
||||
## Linting
|
||||
@@ -387,13 +393,18 @@ wire a; // lucisv: waive no-tabs suppresses that rule on this line
|
||||
works unedited — including waivers naming Verible rules lucisv has not
|
||||
implemented, which are ignored rather than reported. A waiver of lucisv's own
|
||||
that suppresses nothing, names an unknown rule or is malformed is reported
|
||||
under `unused-waiver`. External waiver files are not supported. Full rules:
|
||||
under `unused-waiver`. External waiver files are not supported in v0.41.0
|
||||
(planned in TODO §39).
|
||||
The server currently selects rules from `lucisv.lint.*` editor settings;
|
||||
project `[lint] select/ignore` lists affect the CLI only. Project per-rule
|
||||
options are read by both front ends. Full rules:
|
||||
`docs/features/linter-core/README.md`.
|
||||
|
||||
## Architecture (the ruff mapping)
|
||||
|
||||
The workspace mirrors ruff's crate layout — a comment-preserving parser, a
|
||||
generic pretty-printing IR, language formatting rules, and a thin CLI:
|
||||
The eight-crate workspace separates source syntax, reusable engines, project
|
||||
inputs, and the CLI/LSP front ends. The formatter follows ruff's separation
|
||||
of document layout from language rules:
|
||||
|
||||
| This repo | ruff equivalent | Role |
|
||||
|---|---|---|
|
||||
@@ -401,7 +412,18 @@ generic pretty-printing IR, language formatting rules, and a thin CLI:
|
||||
| `crates/vlog_formatter/src/{doc,printer}.rs` | `ruff_formatter` | Wadler/prettier-style document IR (`Text`/`Line`/`Group`/`Indent`) + width-aware printer |
|
||||
| `crates/vlog_formatter/src/format/` | `ruff_python_formatter` | Per-node formatting rules, one module per grammar domain (`item`, `module`, `instance`, `decl`, `stmt`, `expr`, `class`, `cover`, `sva`, …) |
|
||||
| `crates/vlog_linter` | `ruff_linter` | Rule registry, violations, fix applicability, waivers |
|
||||
| `crates/lucisv` | the `ruff` CLI | File discovery, in-place rewriting, `--check`, `check`, stdin mode |
|
||||
| `crates/vlog_semantic` | — | File scopes and references, workspace index, conservative cross-file resolution |
|
||||
| `crates/vlog_refactor` | — | Verified rename, references, port refactors, instantiation plans |
|
||||
| `crates/lucisv_core` | — | Shared config, filelists, walks, format cache, atomic replacement |
|
||||
| `crates/lucisv` | the `ruff` CLI | Parallel per-file formatting/linting, reports, stdin, in-place writes |
|
||||
| `crates/lucisv_server` | — | Synchronous LSP loop, open-buffer overlays, indexing, editor capabilities |
|
||||
|
||||
`vlog_parser` and `lucisv_core` have no dependencies. The formatter depends
|
||||
only on the parser; semantic analysis also depends only on the parser.
|
||||
Linting and refactoring consume the parser and semantics. The CLI reaches
|
||||
semantics through the linter and has no refactoring dependency. The server
|
||||
composes all six libraries. See [topo.md](docs/topo.md) for the full graph,
|
||||
including the linter's formatter dependency used only by tests.
|
||||
|
||||
Key ideas carried over from ruff/prettier:
|
||||
|
||||
@@ -414,8 +436,15 @@ Key ideas carried over from ruff/prettier:
|
||||
lists, expressions, concatenations) is a `Group`: it renders on one line if
|
||||
it fits within the line limit, otherwise it breaks one-element-per-line.
|
||||
A comment inside a group forces it to break.
|
||||
- **Idempotency as a hard invariant.** The test suite formats every fixture
|
||||
twice and asserts a fixed point.
|
||||
- **Verification on every formatting call.** The engine re-lexes input and
|
||||
output and compares normalized tokens, including comments. It then parses
|
||||
and formats the output again and requires a fixed point. Either check can
|
||||
reject the result; the caller retains the original file. This is a lexical
|
||||
safety net, not compiler elaboration or a proof of hardware equivalence.
|
||||
- **Two parsing modes.** Formatting uses strict parsing. Linting and the
|
||||
editor use tolerant parsing: failed elements become error leaves while
|
||||
valid siblings remain available for analysis. A lexer failure is still
|
||||
all-or-nothing. Neither mode performs cross-file macro expansion.
|
||||
|
||||
## Style
|
||||
|
||||
@@ -871,8 +900,11 @@ vim.lsp.enable('lucisv')
|
||||
**Which files the server indexes.** A filelist if the project has one — the
|
||||
`filelist` key of its `lucisv.toml`, or the editor setting `lucisv.filelist`
|
||||
(a path, absolute or relative to the workspace folder) — and then exactly the
|
||||
files it names. Otherwise the workspace folder, walked as the CLI walks it;
|
||||
and with no folder open at all, the current file's own directory. Open buffers
|
||||
files it names. Otherwise the default `lucisv.index.scope = "folder"` starts
|
||||
from open-file folders, widens by `lucisv.index.scopeDepth` (default 2), and stays bounded by
|
||||
the workspace roots; `"workspace"` walks the full roots. With no folder open,
|
||||
the server stays in the current file's directory: depth 0 scans it flat; a
|
||||
positive depth walks its descendants but never climbs to a parent. Open buffers
|
||||
are always indexed on top. A filelist that cannot be read warns and falls back
|
||||
to the folder walk, so the index is never silently empty.
|
||||
|
||||
@@ -903,11 +935,20 @@ expected; no PRs or review required.
|
||||
|
||||
```bash
|
||||
cargo build --release # binaries at target/release/{lucisv,lucisv-server}
|
||||
cargo test # unit + snapshot + idempotency tests
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --workspace --all-targets -- -D warnings
|
||||
tools/guard.sh -- cargo test --workspace # unit, integration, snapshots, doc tests
|
||||
```
|
||||
|
||||
Snapshot tests live in `crates/vlog_formatter/tests/fixtures/`; regenerate
|
||||
expected outputs with `UPDATE_SNAPSHOTS=1 cargo test -p vlog_formatter`.
|
||||
expected outputs only for intentional formatting changes with
|
||||
`UPDATE_SNAPSHOTS=1 tools/guard.sh -- cargo test -p vlog_formatter`.
|
||||
Table-driven cases live in `crates/vlog_formatter/tests/cases/`; lint cases
|
||||
live in `crates/vlog_linter/tests/cases/`. All tests, fuzzers, and corpus/tree
|
||||
sweeps must run through `tools/guard.sh` (8 GiB RSS / 30 minutes by default),
|
||||
as required by [CLAUDE.md](CLAUDE.md). A guard kill is a finding, not a reason
|
||||
to increase the limit. Documentation build instructions are in
|
||||
[docs/site/README.md](docs/site/README.md).
|
||||
|
||||
## Install and releases
|
||||
|
||||
|
||||
+22
-3
@@ -1,5 +1,24 @@
|
||||
# Verilog/SystemVerilog coverage gaps — ranked (2026-09-01)
|
||||
|
||||
**Reading this report today (2026-09-04).** The survey below is a historical
|
||||
v0.21.0 measurement with later amendments, not a fresh list of current failures.
|
||||
For the current implementation and outstanding contracts, use
|
||||
[repository-analysis.md](repository-analysis.md) and [topo.md](topo.md).
|
||||
Since the original survey, interface/modport and struct-member semantics,
|
||||
statement/class fences, header/list recovery, rule documentation, and three
|
||||
lint expansion waves have landed. The old probes were not re-run as part of
|
||||
the documentation audit; their historical counts are retained.
|
||||
|
||||
Current follow-ups to the latest addendum: v0.40.0 recovers bare item-level
|
||||
`begin` blocks as `ItemKind::GenBlock` **in tolerant mode**, so lint rules see
|
||||
their contents; strict formatting still refuses them. It also improves recovery
|
||||
for unclosed overrides that would consume the following instance. The
|
||||
post-v0.41.0 `parser-skips` commit accepts rival conditional unit headers as
|
||||
verbatim units and preserves net delays before or after the type. Its QA is
|
||||
accepted; release v0.42.0 is pending. Comments immediately before a net-delay
|
||||
`#` still cause a formatter verification refusal. External waiver files remain
|
||||
planned, not implemented.
|
||||
|
||||
What lucisv 0.21.0 does not yet handle, ranked by severity, from two
|
||||
independent sweeps crossed against each other:
|
||||
|
||||
@@ -149,8 +168,7 @@ signal named only inside a property edits it, references list it, and the
|
||||
"at least identifier occurrences" fallback the C1 row asked for was
|
||||
overtaken rather than built (what the grammar cannot read still rewinds to
|
||||
the byte-exact capture, and rename *names* those regions instead of going
|
||||
quiet). What the tables above still leave open, by weight: the second half of
|
||||
M12 (`--rules-doc`, §2.9-5); L3, L6, L9 and L10. M10's error recovery inside
|
||||
quiet). What the tables above still leave open, by weight: L3, L6, L9 and L10. M12's second half (`--rules-doc`, §2.9-5) was delivered by macro-word-census. M10's error recovery inside
|
||||
headers and lists is closed (TODO §32), with the narrowing recorded in its
|
||||
row: a truncated file reports *more* diagnostics than before, because the
|
||||
constructs that now survive say what closer they are missing. M13's small
|
||||
@@ -174,7 +192,8 @@ the generated truth.
|
||||
|
||||
Three coverage notes the wave produced, none of them a language gap:
|
||||
|
||||
- **`begin` where an item belongs is a parser gap, not a rule gap.** The
|
||||
- **Historical parser gap, closed in tolerant mode by v0.40.0:** `begin`
|
||||
where an item belongs. At the time of this addendum, the
|
||||
parser refuses a module-scope `begin … end` and a bare `begin` inside a
|
||||
`generate` region rather than recovering either as a block, so recovery
|
||||
unwinds and the rest of that unit is lost — `module-begin-block` and
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
# Repository analysis
|
||||
|
||||
Audited 2026-09-04 against HEAD `d5abf81`. The manifest still declares
|
||||
**v0.41.0**; HEAD includes the accepted parser-skips work intended for
|
||||
v0.42.0. This is a source and documentation audit, not a new performance or
|
||||
full language-conformance measurement.
|
||||
|
||||
## Assessment
|
||||
|
||||
lucisv is a complete developer-tool stack, with eight Rust crates (six
|
||||
libraries and two binaries), a VS Code extension, Neovim/Vim configuration,
|
||||
release/corpus scripts, and an Astro/Starlight documentation site. Its strongest
|
||||
architectural choices are shared language engines, runtime formatter checks,
|
||||
conservative semantic resolution, and a single owner for mutable LSP state.
|
||||
|
||||
The most consequential remaining issues found in this audit are coordination
|
||||
between atomic writers and disagreement between project-file and editor lint
|
||||
selection. The test suite passes, but neither result establishes those contracts:
|
||||
the atomic tests exercise sequential replacement, and editor rule-selection
|
||||
tests exercise client settings. Documentation had also fallen behind the
|
||||
recent implementation rounds.
|
||||
|
||||
## Repository map
|
||||
|
||||
| Location | Responsibility and starting point |
|
||||
|---|---|
|
||||
| `crates/vlog_parser` | Lexer and trivia, strict/tolerant recursive descent, AST and source coordinates; start at `src/lib.rs`, then `parser/` and `ast/` |
|
||||
| `crates/vlog_formatter` | AST → document IR → printer, alignment, fences, ranges, token equivalence and convergence; start at `src/format/mod.rs` and `src/verify.rs` |
|
||||
| `crates/vlog_semantic` | File binding/resolution and workspace facts; start at `src/lib.rs`, `bind/`, `workspace/`, and `facts.rs` |
|
||||
| `crates/vlog_linter` | 73-rule registry, lazy analysis, options, severity, inline waivers and fixes; start at `src/lib.rs`, `context.rs`, and `registry.rs` |
|
||||
| `crates/vlog_refactor` | Rename/references, port edits and instance plans; shared `src/scope.rs`, whole-edit checks in `check.rs` |
|
||||
| `crates/lucisv_core` | Config, filelists, walking, format cache and atomic replacement; no language-engine dependency |
|
||||
| `crates/lucisv` | CLI argument handling, discovery, worker pool, reports and writes; `src/main.rs`, `args.rs`, `lint.rs` |
|
||||
| `crates/lucisv_server` | Synchronous LSP transport, workspace state, overlays, scans and capability handlers; `src/main.rs`, `server/`, `state.rs` |
|
||||
| `editors/` | VS Code client/grammar/settings/hierarchy UI, plus configuration examples for other editors |
|
||||
| `tools/`, `scripts/`, `.gitea/workflows/` | Resource guard, corpus evaluation, artifact audits and release automation |
|
||||
| `docs/features/` | Feature-specific contracts, implementation history, QA and review; 135 READMEs at audit time |
|
||||
| `docs/site/` | User-facing static documentation and tracked generated output |
|
||||
|
||||
[topo.md](topo.md) gives dependency directions, recent cross-crate contracts,
|
||||
shared interfaces, and numbered open handshakes. The manifests are authoritative
|
||||
for crate edges; an absent documented edge alone does not prove two edits safe
|
||||
to perform concurrently.
|
||||
|
||||
## Runtime behavior and limits
|
||||
|
||||
**Formatting.** `format_source` strictly parses input, renders a document tree,
|
||||
re-lexes both versions and compares normalized tokens (including comments),
|
||||
then parses/formats the output again and checks convergence. A failed check
|
||||
returns an error instead of a candidate string. The CLI leaves the affected
|
||||
source file alone. This protects lexical fidelity and stable layout; it does
|
||||
not elaborate SystemVerilog or prove hardware equivalence. Fenced text still
|
||||
has to parse. Ranges select items; fences can additionally protect statements
|
||||
and class members.
|
||||
|
||||
**Linting.** `ParsedSource` shares a tokenization and tolerant parse, and
|
||||
`LintContext` computes semantics lazily. Rules consume text, tokens, AST, and
|
||||
optional project facts; malformed AST elements remain opaque. Inline waivers
|
||||
filter findings, and severity is stamped centrally. The CLI/server filter
|
||||
fixes through the formatter's fence API: `apply_fixes` alone does not provide
|
||||
that protection. `always-comb` offers an unsafe fix; editor actions offer only
|
||||
safe fixes.
|
||||
|
||||
**Refactoring and editor state.** Refactors use resolved source spans and check
|
||||
the whole edit; source selectors must remain supersets of every file an engine
|
||||
could edit or refuse over. The LSP loop owns workspace mutation, open documents
|
||||
overlay disk facts, and stepped scans publish related index/include/completion
|
||||
state together. Facts persist under `FACTS_FORMAT = 17`. Lazy port code actions
|
||||
compute their edits on selection for capable clients. Recorded UTF-16 positions
|
||||
avoid reads for closed-file file-scope definitions; members and open buffers
|
||||
still use text-based locations.
|
||||
|
||||
**Intentional scope.** Neither parser mode performs cross-file macro expansion
|
||||
or compiler elaboration. Missing definitions outside an index scope can mean
|
||||
missing hints or conservative lint silence. Rootless indexing never climbs;
|
||||
with depth 0 it reads siblings flat, while positive depth walks descendants.
|
||||
The published 814/820 frozen-corpus result is historical feature QA evidence,
|
||||
not a new corpus sweep performed by this audit. Performance reports under
|
||||
`docs/performance*.md` and `docs/perf/` likewise remain dated measurements.
|
||||
|
||||
## Findings and follow-up priorities
|
||||
|
||||
### 1. Coordinate writes to a shared target
|
||||
|
||||
Evidence: [atomic.rs](../crates/lucisv_core/src/atomic.rs) canonicalizes the
|
||||
target, then derives a temp name from the target filename and process ID.
|
||||
`fs::write` opens that predictable path without exclusive creation.
|
||||
[CLI dedup](../crates/lucisv/src/main.rs) folds lexical path components but
|
||||
intentionally leaves symlinks unresolved. Two rayon jobs reaching one target
|
||||
through different spellings can therefore share a temporary file.
|
||||
|
||||
A disposable probe compiled the actual `atomic.rs` and used two barrier-started
|
||||
threads per round to write different 1 MiB buffers to one target. Across
|
||||
**100 rounds / 200 calls, 100 writes failed**. The final file in every round
|
||||
was a complete one-writer buffer; **no mixed final bytes were observed**. This
|
||||
reproduces the helper's collision, not an end-to-end formatter corruption.
|
||||
The probe used only `/tmp` files and ran under the resource guard.
|
||||
|
||||
Recommended follow-up: exclusive, unique per-operation temp files; coordinate
|
||||
or deduplicate writes by target identity; add a concurrent alias regression.
|
||||
The existing temp-and-rename helper is useful for sequential replacement, but
|
||||
its tests do not justify a same-target concurrency guarantee. Tracked as
|
||||
[topology handshake 26](topo.md).
|
||||
|
||||
### 2. Define a consistent project lint configuration contract
|
||||
|
||||
Evidence: [server linting](../crates/lucisv_server/src/lint.rs) selects rules in
|
||||
`enabled_rules` from `ClientSettings` only. Its `configured` function discovers
|
||||
`lucisv.toml` but reads `lint_options` and line length, not `lint_select` or
|
||||
`lint_ignore`. In contrast, [CLI linting](../crates/lucisv/src/lint.rs) consumes
|
||||
project selection. The server also discards invalid project option entries
|
||||
with `let _ = options.set_raw(...)`; only invalid *editor* option settings
|
||||
receive the corresponding per-entry log.
|
||||
|
||||
The docs now describe the implemented behavior: project selection controls CLI
|
||||
runs; editor selection requires `lucisv.lint.*` settings; valid project rule
|
||||
options are shared. Recommended follow-up: specify and test project/editor
|
||||
selection precedence and surface rejected project rule options. Tracked as
|
||||
topology handshake 28. This finding is from source inspection; no dedicated
|
||||
wire-level configuration reproduction was run in this audit.
|
||||
|
||||
### 3. Keep traversal and semantic gaps explicit
|
||||
|
||||
The shared [directory walker](../crates/lucisv_core/src/walk.rs) recursively
|
||||
follows `Path::is_dir()` with no visited-directory set. Symlink cycles remain
|
||||
an existing open issue (topology handshake 8); eventual filesystem refusal is
|
||||
not an explicit traversal budget or cycle policy. Prioritize a deliberate
|
||||
cycle policy before broadening traversal.
|
||||
|
||||
Other concrete open contracts include missing type spans (handshake 2),
|
||||
package re-export resolution (16), inline aggregate type arguments (17), and
|
||||
cross-file rename of an internal module net (23). The parser-skips regression
|
||||
suite also retains a refusal for comments immediately before a net-delay `#`
|
||||
(27). These limitations should remain visible when widening grammar or index
|
||||
coverage; formatter verification must continue to reject unsupported output.
|
||||
|
||||
## Documentation changes from this audit
|
||||
|
||||
- Expanded the README's architecture to cover all eight crates and documented
|
||||
the runtime checks, actual indexing behavior, documentation entry points,
|
||||
and guarded verification commands.
|
||||
- Updated topology facts to codec 17, corrected moved module paths, recorded
|
||||
recent recovery/lint/fence/atomic/LSP contracts, and closed the stale `program`
|
||||
linked-editing request using the existing module-shaped AST path.
|
||||
- Updated site configuration, formatter/linter guides, CLI, language tools,
|
||||
architecture and API navigation for current behavior. The API index now
|
||||
explicitly defers to rustdoc for exhaustive signatures and fields.
|
||||
- Removed the stale `0.9.0` product version from site structured metadata;
|
||||
release versions remain owned by the workspace/release files.
|
||||
|
||||
The parser-skips changes were already present when the audit started and were
|
||||
committed by another workflow during the audit. Their QA log now records PASS;
|
||||
the topology reflects that final state. This audit made no Rust implementation
|
||||
changes and did not modify their feature log or backlog checkboxes.
|
||||
|
||||
## Validation
|
||||
|
||||
- `cargo fmt --all -- --check`: passed.
|
||||
- `cargo clippy --workspace --all-targets -- -D warnings`: passed.
|
||||
- `tools/guard.sh -- cargo test --workspace`: **3,745 passed, 0 failed,
|
||||
44 ignored**, summed across 48 test/doc-test harnesses. Counts include the
|
||||
post-v0.41.0 parser-skip cases and one passing doctest; ignored measurement
|
||||
tests were not enabled.
|
||||
- Documentation build: `ASTRO_TELEMETRY_DISABLED=1 npm run build` in
|
||||
`docs/site` passed; 13 pages, Pagefind index and sitemaps generated.
|
||||
- Generated-site verification: 817 local links, assets and anchors checked,
|
||||
zero failures; relative links in the repository documentation checked.
|
||||
`git diff --check` passed.
|
||||
- Atomic-write probe: collision reproduced as described above, no repository
|
||||
source files written.
|
||||
|
||||
The first test attempt was stopped because sandboxed `ps` prevented the guard
|
||||
from measuring memory; the successful rerun used an approved environment where
|
||||
monitoring worked. No corpus sweep, OpenTitan sweep, ignored benchmark run,
|
||||
release packaging, or external publishing was performed by this audit.
|
||||
+47
-5
@@ -1,13 +1,55 @@
|
||||
# lucisv documentation site
|
||||
|
||||
The source and generated static documentation site are self-contained in this directory.
|
||||
Astro 7 and Starlight build the static user guide and reference pages from
|
||||
`src/content/docs/`. Dependencies are pinned in `package.json` and
|
||||
`package-lock.json`; use the lockfile when installing:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
cd docs/site
|
||||
npm ci
|
||||
npm run dev
|
||||
npm run build
|
||||
```
|
||||
|
||||
The deployable output is `dist/`. It contains pre-rendered HTML, CSS, JavaScript, a Pagefind search index, and XML sitemaps; no application server is required.
|
||||
Build and inspect the deployable output:
|
||||
|
||||
The site uses Astro 7 and Starlight. Documentation pages live in `src/content/docs/`, and visual customization lives in `src/styles/custom.css`.
|
||||
```bash
|
||||
npm run build
|
||||
npm run preview
|
||||
```
|
||||
|
||||
`dist/` contains pre-rendered HTML, CSS, JavaScript, Pagefind search, and XML
|
||||
sitemaps; no application server is required. It is tracked in this repository,
|
||||
so rebuild it after changing documentation and review the generated diff.
|
||||
Building does not publish the site. In a restricted environment, use
|
||||
`ASTRO_TELEMETRY_DISABLED=1 npm run build` to avoid Astro writing its global
|
||||
telemetry preferences.
|
||||
|
||||
## Editing and verification
|
||||
|
||||
- Usage guides: `src/content/docs/start/` and `guides/`.
|
||||
- CLI, lint rules, LSP, architecture and API navigation:
|
||||
`src/content/docs/reference/`.
|
||||
- Overview: `src/content/docs/index.mdx`.
|
||||
- Routes/sidebar, site URL and metadata: `astro.config.mjs`.
|
||||
- Visual styles: `src/styles/custom.css`; static media: `public/`.
|
||||
|
||||
The site is derived documentation. Check behavior against the Rust source,
|
||||
CLI help, and feature contracts before updating prose. The repository-wide
|
||||
[analysis](../repository-analysis.md) and [topology](../topo.md) cover internal
|
||||
ownership and limitations. Historical coverage/performance numbers must retain
|
||||
their measurement scope and date.
|
||||
|
||||
From the repository root, generate the canonical lint rule reference and the
|
||||
complete Rust API docs with:
|
||||
|
||||
```bash
|
||||
cargo run -p lucisv -- check --rules-doc
|
||||
cargo doc --workspace --no-deps
|
||||
```
|
||||
|
||||
The site rule page adds editorial explanations; it must agree with the
|
||||
registry's rule names, severities, defaults, options and fix applicability.
|
||||
The API page is navigational, not an exhaustive signature inventory.
|
||||
`npm run build` validates content rendering and builds search/sitemaps.
|
||||
`npm run check` invokes Astro's optional checker; it requires checker
|
||||
packages beyond this site's current declared dependencies.
|
||||
@@ -28,7 +28,6 @@ export default defineConfig({
|
||||
name: 'lucisv',
|
||||
applicationCategory: 'DeveloperApplication',
|
||||
operatingSystem: 'macOS, Linux, Windows',
|
||||
softwareVersion: '0.9.0',
|
||||
license: 'https://opensource.org/licenses/MIT',
|
||||
description: 'A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.',
|
||||
codeRepository: 'https://git.luci.ooo/lucio/verilogrustformatter'
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-hero class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>404 | lucisv</title><link rel="canonical" href="https://lucisv.dev/404/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="404"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/404/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Fast, deterministic formatting, linting, and language intelligence for Verilog and SystemVerilog."/><meta name="description" content="Fast, deterministic formatting, linting, and language intelligence for Verilog and SystemVerilog."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-hero class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>404 | lucisv</title><link rel="canonical" href="https://lucisv.dev/404/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="404"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/404/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Fast, deterministic formatting, linting, and language intelligence for Verilog and SystemVerilog."/><meta name="description" content="Fast, deterministic formatting, linting, and language intelligence for Verilog and SystemVerilog."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editors & LSP | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/editors/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Editors & LSP"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/editors/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Set up lucisv-server in VS Code, Neovim, Vim, and other Language Server Protocol clients."/><meta name="description" content="Set up lucisv-server in VS Code, Neovim, Vim, and other Language Server Protocol clients."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editors & LSP | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/editors/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Editors & LSP"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/editors/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Set up lucisv-server in VS Code, Neovim, Vim, and other Language Server Protocol clients."/><meta name="description" content="Set up lucisv-server in VS Code, Neovim, Vim, and other Language Server Protocol clients."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
|
||||
+7
-3
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Formatter | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/formatter/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Formatter"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/formatter/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Understand lucisv’s deterministic formatting model, alignment inference, fences, ranges, and safety invariants."/><meta name="description" content="Understand lucisv’s deterministic formatting model, alignment inference, fences, ranges, and safety invariants."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Formatter | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/formatter/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Formatter"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/formatter/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Understand lucisv’s deterministic formatting model, alignment inference, fences, ranges, and safety invariants."/><meta name="description" content="Understand lucisv’s deterministic formatting model, alignment inference, fences, ranges, and safety invariants."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -86,7 +86,11 @@
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="format-fences">Format fences</h2><a class="sl-anchor-link" href="#format-fences"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Format fences”</span></a></div>
|
||||
<p>Use a standalone fence to protect hand-laid-out regions:</p>
|
||||
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.w36nc.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="system-verilog"><code><div class="ec-line"><div class="code"><span style="--0:#919F9F;--1:#5D6376">// verilog_format: off</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">localparam int</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">A</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8844AE">=</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">1</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">localparam int</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">LONGER</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8844AE">=</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">22</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#919F9F;--1:#5D6376">// verilog_format: on</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="// verilog_format: offlocalparam int A = 1;localparam int LONGER = 22;// verilog_format: on"><div></div></button></div></figure></div>
|
||||
<p><code dir="auto">// lucisv: off</code> and <code dir="auto">// lucisv: on</code> are aliases. Fences preserve exact bytes inside whole-item regions and also prevent lint fixes there.</p>
|
||||
<p><code dir="auto">// lucisv: off</code> and <code dir="auto">// lucisv: on</code> are aliases. Fences preserve exact bytes between items (including class members) and
|
||||
between statements in blocks, forks, functions, tasks, and procedural bodies.
|
||||
They also prevent lint fixes there. A fence must begin on its own line;
|
||||
port/parameter lists, case-label lists, and property/sequence local declarations
|
||||
do not have independent fence scopes. Fenced text must still parse.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="range-formatting">Range formatting</h2><a class="sl-anchor-link" href="#range-formatting"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Range formatting”</span></a></div>
|
||||
<p><code dir="auto">--lines</code> selects 1-based inclusive ranges:</p>
|
||||
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">lucisv</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--lines</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">120-134</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">rtl/alu.sv</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">lucisv</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--lines</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">3-9,40</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">rtl/alu.sv</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="lucisv --lines 120-134 rtl/alu.svlucisv --lines 3-9,40 --check rtl/alu.sv"><div></div></button></div></figure></div>
|
||||
@@ -94,7 +98,7 @@
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="safety-invariants">Safety invariants</h2><a class="sl-anchor-link" href="#safety-invariants"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Safety invariants”</span></a></div>
|
||||
<ol>
|
||||
<li><strong>Parse first.</strong> Whole-file formatting produces no output for a file that cannot be fully parsed.</li>
|
||||
<li><strong>Preserve meaning.</strong> Verification compares normalized syntax before accepting output.</li>
|
||||
<li><strong>Preserve meaning.</strong> Verification re-lexes input and output and compares normalized tokens, including comments; it does not elaborate the design.</li>
|
||||
<li><strong>Converge.</strong> Formatting twice reaches the same fixed point.</li>
|
||||
<li><strong>Write atomically.</strong> An error leaves the affected file untouched.</li>
|
||||
<li><strong>Stay deterministic.</strong> Parallel worker count changes performance, never output order or exit status.</li>
|
||||
|
||||
+20
-5
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Linter | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/linter/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Linter"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/linter/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Run lucisv lint checks, select rules, apply safe fixes, configure output, and use source waivers."/><meta name="description" content="Run lucisv lint checks, select rules, apply safe fixes, configure output, and use source waivers."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Linter | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/linter/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Linter"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/linter/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Run lucisv lint checks, select rules, apply safe fixes, configure output, and use source waivers."/><meta name="description" content="Run lucisv lint checks, select rules, apply safe fixes, configure output, and use source waivers."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -70,16 +70,31 @@
|
||||
})();
|
||||
</script></sl-sidebar-state-persist><div class="md:sl-hidden"><div class="mobile-preferences sl-flex astro-b5gddk54"><div class="social-icons astro-b5gddk54"><a href="https://git.luci.ooo/lucio/verilogrustformatter" rel="me" class="sl-flex astro-cg55etiy"><span class="sr-only astro-cg55etiy">Source repository</span><svg aria-hidden="true" class="astro-cg55etiy astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a></div><starlight-theme-select><label style="--sl-select-width: 6.25em" class="astro-r2p65idu"><span class="sr-only astro-r2p65idu">Select theme</span><svg aria-hidden="true" class="icon label-icon astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg><select autocomplete="off" class="astro-r2p65idu"><option value="dark" class="astro-r2p65idu">Dark</option><option value="light" class="astro-r2p65idu">Light</option><option value="auto" selected class="astro-r2p65idu">Auto</option></select><svg aria-hidden="true" class="icon caret astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg></label></starlight-theme-select><script>
|
||||
StarlightThemeProvider.updatePickers();
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#selecting-rules" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Selecting rules</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#fixes" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Fixes</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#waivers" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Waivers</span></a></li></ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.BcSo_yiZ.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-q5mffni3"><div class="sl-container astro-q5mffni3"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#selecting-rules" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Selecting rules</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#fixes" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Fixes</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#waivers" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Waivers</span></a></li></ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.Csloo1VZ.js"></script></div></div></div></aside><div class="main-pane astro-abfeecmu"><main data-pagefind-body class="astro-vdxcvpsm" lang="en" dir="ltr"><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><h1 id="_top" class="astro-2sm4b3ln">Linter</h1></div></div><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><div class="sl-markdown-content"><p>The linter shares discovery, parsing, configuration, and ignore behavior with the formatter, but uses error-tolerant parsing so it can report useful findings from partially understood files.</p>
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#selecting-rules" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Selecting rules</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#fixes" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Fixes</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#options-and-diagnostics" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Options and diagnostics</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#waivers" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Waivers</span></a></li></ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.BcSo_yiZ.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-q5mffni3"><div class="sl-container astro-q5mffni3"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#selecting-rules" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Selecting rules</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#fixes" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Fixes</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#options-and-diagnostics" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Options and diagnostics</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#waivers" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Waivers</span></a></li></ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.Csloo1VZ.js"></script></div></div></div></aside><div class="main-pane astro-abfeecmu"><main data-pagefind-body class="astro-vdxcvpsm" lang="en" dir="ltr"><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><h1 id="_top" class="astro-2sm4b3ln">Linter</h1></div></div><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><div class="sl-markdown-content"><p>The linter shares discovery, parsing, configuration, and ignore behavior with the formatter, but uses error-tolerant parsing so it can report useful findings from partially understood files.</p>
|
||||
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.w36nc.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">lucisv</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">rtl/</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">lucisv</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--select</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">no-tabs,unused-signal</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">rtl/</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">lucisv</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--ignore</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">module-filename</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">rtl/</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">lucisv</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--fix</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">rtl/</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">lucisv</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--output-format</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">json</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">rtl/</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="lucisv check rtl/lucisv check --select no-tabs,unused-signal rtl/lucisv check --ignore module-filename rtl/lucisv check --fix rtl/lucisv check --output-format json rtl/"><div></div></button></div></figure></div>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="selecting-rules">Selecting rules</h2><a class="sl-anchor-link" href="#selecting-rules"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Selecting rules”</span></a></div>
|
||||
<p><code dir="auto">--select</code> replaces the default set with a comma-separated list. It can be repeated. <code dir="auto">--ignore</code> then removes rules from the selected or default set. Both can also be written in <code dir="auto">lucisv.toml</code> under a <code dir="auto">[lint]</code> table (<code dir="auto">select = [...]</code>, <code dir="auto">ignore = [...]</code>), which a command-line flag overrides key by key, and in an editor as <code dir="auto">lucisv.lint.select</code> / <code dir="auto">lucisv.lint.ignore</code>.</p>
|
||||
<p><code dir="auto">--select</code> replaces the default set with a comma-separated list. It can be repeated. <code dir="auto">--ignore</code> then removes rules from the selected or default set. Both accept rule names and the severity classes <code dir="auto">error</code>, <code dir="auto">warning</code>, and <code dir="auto">style</code> (for example, <code dir="auto">--ignore style</code>). Both can also be written in <code dir="auto">lucisv.toml</code> under a <code dir="auto">[lint]</code> table (<code dir="auto">select = [...]</code>, <code dir="auto">ignore = [...]</code>), which a command-line flag overrides key by key, and in an editor as <code dir="auto">lucisv.lint.select</code> / <code dir="auto">lucisv.lint.ignore</code>.</p>
|
||||
<p>The semantic rules — <code dir="auto">unused-signal</code>, <code dir="auto">undriven-net</code>, <code dir="auto">multiply-driven</code> — run by default wherever lucisv can see the other files of your project (<code dir="auto">lucisv check rtl/</code>, or the language server), because it can then tell that another file reads a signal through a hierarchical path. Over a <strong>single file</strong> or a stdin buffer there is nothing to ask, so they are off and must be <code dir="auto">--select</code>ed.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="fixes">Fixes</h2><a class="sl-anchor-link" href="#fixes"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Fixes”</span></a></div>
|
||||
<p><code dir="auto">--fix</code> applies safe changes and rewrites the file. Today, <code dir="auto">no-tabs</code> and <code dir="auto">no-trailing-whitespace</code> provide safe fixes. <code dir="auto">--unsafe-fixes</code> widens applicability, but no built-in rule currently offers an unsafe fix.</p>
|
||||
<p>Fixes are sorted, overlap-checked, and never applied inside format-fenced regions.</p>
|
||||
<p><code dir="auto">--fix</code> applies safe changes and rewrites the file. Safe fixes include whitespace cleanup, <code dir="auto">posix-eof</code>, <code dir="auto">empty-item</code>,
|
||||
<code dir="auto">undersized-binary-literal</code>, <code dir="auto">explicit-begin</code>, <code dir="auto">suggest-parentheses</code>, and
|
||||
<code dir="auto">endif-comment</code>; the rule reference lists applicability per rule.
|
||||
<code dir="auto">--unsafe-fixes</code> also permits the <code dir="auto">always-comb</code> rewrite, whose scheduling
|
||||
semantics can differ from <code dir="auto">always @*</code>. Editor quick fixes offer safe fixes only.</p>
|
||||
<p>Fixes are sorted, overlap-checked, and filtered against format-fenced regions
|
||||
by the CLI and server. The reusable linter and <code dir="auto">apply_fixes</code> API are
|
||||
fence-blind; callers performing automatic edits must apply that protection.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="options-and-diagnostics">Options and diagnostics</h2><a class="sl-anchor-link" href="#options-and-diagnostics"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Options and diagnostics”</span></a></div>
|
||||
<p>Use <code dir="auto">[lint.<rule>]</code> in <code dir="auto">lucisv.toml</code> or <code dir="auto">lucisv.lint.options</code> in the editor for
|
||||
per-rule options. See <a href="/start/configuration/">configuration</a> for precedence.
|
||||
<code dir="auto">lucisv check --rules-doc</code> prints all 73 registered rules, their severity,
|
||||
default selection, fix applicability, and option defaults.</p>
|
||||
<p>Text output uses <code dir="auto">FILE:LINE:COL: severity: message [rule]</code>. JSON output is one
|
||||
array, with a <code dir="auto">severity</code> field on each diagnostic.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="waivers">Waivers</h2><a class="sl-anchor-link" href="#waivers"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Waivers”</span></a></div>
|
||||
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="system-verilog"><code><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">wire</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3B61B0">a</span><span style="--0:#D6DEEB;--1:#403F53">; </span><span style="--0:#919F9F;--1:#5D6376">// lucisv: waive no-tabs</span></div></div><div class="ec-line"><div class="code"><span style="--0:#919F9F;--1:#5D6376">// lucisv: waive no-tabs</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">wire</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3B61B0">b</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#919F9F;--1:#5D6376">// lucisv: waive-start module-name-style</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">module</span><span style="--0:#D6DEEB;--1:#403F53"> LegacyName;</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">endmodule</span></div></div><div class="ec-line"><div class="code"><span style="--0:#919F9F;--1:#5D6376">// lucisv: waive-stop module-name-style</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="wire a; // lucisv: waive no-tabs// lucisv: waive no-tabswire b;// lucisv: waive-start module-name-stylemodule LegacyName;endmodule// lucisv: waive-stop module-name-style"><div></div></button></div></figure></div>
|
||||
<p><code dir="auto">verilog_lint:</code> is accepted in place of <code dir="auto">lucisv:</code> for Verible compatibility. The <code dir="auto">unused-waiver</code> rule reports malformed, unknown, or no-longer-needed suppressions when their target rule is enabled.</p>
|
||||
<p>External waiver files are not implemented in v0.41.0; the planned waiver-file
|
||||
settings and CLI flag are not accepted yet.</p>
|
||||
<p>See the <a href="/reference/rules/">complete rule reference</a>.</p>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/guides/linter.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-02T16:06:08.000Z">Sep 2, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/guides/formatter/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Formatter</span></span></a><a href="/guides/editors/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Editors & LSP</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Supported syntax | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/syntax/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Supported syntax"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/syntax/"/><meta property="og:locale" content="en"/><meta property="og:description" content="The Verilog and SystemVerilog language surface understood by lucisv."/><meta name="description" content="The Verilog and SystemVerilog language surface understood by lucisv."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Supported syntax | lucisv</title><link rel="canonical" href="https://lucisv.dev/guides/syntax/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Supported syntax"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/guides/syntax/"/><meta property="og:locale" content="en"/><meta property="og:description" content="The Verilog and SystemVerilog language surface understood by lucisv."/><meta name="description" content="The Verilog and SystemVerilog language surface understood by lucisv."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -109,4 +109,4 @@
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="not-supported">Not supported</h2><a class="sl-anchor-link" href="#not-supported"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Not supported”</span></a></div>
|
||||
<p><code dir="auto">randsequence</code> and a small set of rare expression/port forms remain outside the formatter grammar. lucisv also does not run a preprocessor, so a file that becomes valid only after cross-file macro expansion may not format as a standalone input.</p>
|
||||
<aside aria-label="Safe failure" class="starlight-aside starlight-aside--caution"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path d="M12 16a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm10.67 1.47-8.05-14a3 3 0 0 0-5.24 0l-8 14A3 3 0 0 0 3.94 22h16.12a3 3 0 0 0 2.61-4.53Zm-1.73 2a1 1 0 0 1-.88.51H3.94a1 1 0 0 1-.88-.51 1 1 0 0 1 0-1l8-14a1 1 0 0 1 1.78 0l8.05 14a1 1 0 0 1 .05 1.02v-.02ZM12 8a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0V9a1 1 0 0 0-1-1Z"/></svg>Safe failure</p><div class="starlight-aside__content"><p>Whole-file formatting returns an error and writes nothing when parsing is incomplete. lucisv never emits a partially understood file.</p></div></aside>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/guides/syntax.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-08-27T03:31:44.000Z">Aug 27, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/guides/editors/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Editors & LSP</span></span></a><a href="/reference/cli/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">CLI</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/guides/syntax.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-03T09:28:11.000Z">Sep 3, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/guides/editors/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Editors & LSP</span></span></a><a href="/reference/cli/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">CLI</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-hero class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>lucisv — Verilog tooling that stays out of your way | lucisv</title><link rel="canonical" href="https://lucisv.dev/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="lucisv — Verilog tooling that stays out of your way"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Format, lint, navigate, and refactor Verilog and SystemVerilog with one fast Rust toolchain."/><meta name="description" content="Format, lint, navigate, and refactor Verilog and SystemVerilog with one fast Rust toolchain."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-hero class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>lucisv — Verilog tooling that stays out of your way | lucisv</title><link rel="canonical" href="https://lucisv.dev/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="lucisv — Verilog tooling that stays out of your way"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Format, lint, navigate, and refactor Verilog and SystemVerilog with one fast Rust toolchain."/><meta name="description" content="Format, lint, navigate, and refactor Verilog and SystemVerilog with one fast Rust toolchain."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -41,4 +41,4 @@
|
||||
</script><script type="module">var e=`starlight-theme`,t=e=>e===`auto`||e===`dark`||e===`light`?e:`auto`,n=()=>t(typeof localStorage<`u`&&localStorage.getItem(e));function r(t){typeof localStorage<`u`&&localStorage.setItem(e,t===`light`||t===`dark`?t:``)}var i=()=>matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`;function a(e){StarlightThemeProvider.updatePickers(e),document.documentElement.dataset.theme=e===`auto`?i():e,r(e)}matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{n()===`auto`&&a(`auto`)});var o=class extends HTMLElement{constructor(){super(),a(n()),this.querySelector(`select`)?.addEventListener(`change`,e=>{e.currentTarget instanceof HTMLSelectElement&&a(t(e.currentTarget.value))})}};customElements.define(`starlight-theme-select`,o);</script><script type="module">var e=class extends HTMLElement{constructor(){super();let e=this.querySelector(`select`);e&&(e.addEventListener(`change`,e=>{e.currentTarget instanceof HTMLSelectElement&&(window.location.pathname=e.currentTarget.value)}),window.addEventListener(`pageshow`,t=>{if(!t.persisted)return;let n=e.querySelector(`option[selected]`)?.index;n!==e.selectedIndex&&(e.selectedIndex=n??0)}))}};customElements.define(`starlight-lang-select`,e);</script></div></div></header><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><div class="main-pane astro-abfeecmu"><main data-pagefind-body class="astro-vdxcvpsm" lang="en" dir="ltr"><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><div class="hero astro-q2ezz3gc"><div class="sl-flex stack astro-q2ezz3gc"><div class="sl-flex copy astro-q2ezz3gc"><h1 id="_top" data-page-title class="astro-q2ezz3gc">SystemVerilog, understood.</h1><div class="tagline astro-q2ezz3gc">Format, lint, navigate, and refactor RTL with one fast engine—at your cursor and in CI.</div></div><div class="sl-flex actions astro-q2ezz3gc"><a class="sl-link-button not-content primary astro-q2ezz3gc astro-hlbqph7b" href="/start/quick-start/">Install lucisv<svg aria-hidden="true" class="astro-hlbqph7b astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg></a><a class="sl-link-button not-content minimal astro-q2ezz3gc astro-hlbqph7b" href="/reference/language-tools/">Explore every feature<svg aria-hidden="true" class="astro-hlbqph7b astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M21.17 2.06A13.1 13.1 0 0 0 19 1.87a12.94 12.94 0 0 0-7 2.05 12.94 12.94 0 0 0-7-2 13.1 13.1 0 0 0-2.17.19 1 1 0 0 0-.83 1v12a1 1 0 0 0 1.17 1 10.9 10.9 0 0 1 8.25 1.91l.12.07h.11a.91.91 0 0 0 .7 0h.11l.12-.07A10.899 10.899 0 0 1 20.83 16 1 1 0 0 0 22 15V3a1 1 0 0 0-.83-.94ZM11 15.35a12.87 12.87 0 0 0-6-1.48H4v-10c.333-.02.667-.02 1 0a10.86 10.86 0 0 1 6 1.8v9.68Zm9-1.44h-1a12.87 12.87 0 0 0-6 1.48V5.67a10.86 10.86 0 0 1 6-1.8c.333-.02.667-.02 1 0v10.04Zm1.17 4.15a13.098 13.098 0 0 0-2.17-.19 12.94 12.94 0 0 0-7 2.05 12.94 12.94 0 0 0-7-2.05c-.727.003-1.453.066-2.17.19A1 1 0 0 0 2 19.21a1 1 0 0 0 1.17.79 10.9 10.9 0 0 1 8.25 1.91 1 1 0 0 0 1.16 0A10.9 10.9 0 0 1 20.83 20a1 1 0 0 0 1.17-.79 1 1 0 0 0-.83-1.15Z"/></svg></a></div></div></div><div class="sl-markdown-content"><section class="feature-lead"><div><span class="section-kicker"><i></i> lucisv language server</span><h2>Real RTL. Real project context.</h2><p>Move from an instance to its module, inspect a port, rename a symbol, or fix a diagnostic without leaving the editor. The same project model powers every answer.</p></div><div class="feature-chips" aria-label="Language server capabilities"><span>Hover</span><span>Completion</span><span>Go to definition</span><span>Rename</span><span>Hierarchy</span><span>Diagnostics</span></div></section><figure class="real-editor-showcase"><div class="screenshot-frame"><img src="/images/opentitan-lucisv-vscode.png" alt="OpenTitan SystemVerilog source open in Visual SLine truncated
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="everything-in-the-edit-loop">Everything in the edit loop</h2><a class="sl-anchor-link" href="#everything-in-the-edit-loop"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Everything in the edit loop”</span></a></div>
|
||||
<p>Formatting, diagnostics, and code intelligence share one parser and one semantic model. The answer in CI is the answer at your cursor.</p>
|
||||
<div class="capability-grid"><a class="capability-card featured" href="/reference/language-tools/#navigation-and-understanding"><span class="capability-icon">⌁</span><span class="eyebrow">Navigate</span><h3>Follow the design, not the files</h3><p>Jump through definitions, references, implementations, document symbols, workspace symbols, type definitions, and call and type hierarchies.</p><span class="card-link">Explore navigation →</span></a><a class="capability-card" href="/reference/language-tools/#editing-and-formatting"><span class="capability-icon">⌘</span><span class="eyebrow">Complete</span><h3>Context-aware suggestions</h3><p>Complete symbols, members, ports, parameters, named associations, macros, keywords, and include paths.</p></a><a class="capability-card" href="/reference/language-tools/#refactoring"><span class="capability-icon">↗</span><span class="eyebrow">Refactor</span><h3>Make project-wide changes safely</h3><p>Rename symbols, organize imports, remove unused imports, and apply quick fixes with previewable workspace edits.</p></a><a class="capability-card" href="/guides/formatter/"><span class="capability-icon">≡</span><span class="eyebrow">Format</span><h3>Deterministic by construction</h3><p>Width-aware layout, preserved comments, inferred alignment, format fences, range formatting, and idempotency checks.</p></a><a class="capability-card" href="/reference/rules/"><span class="capability-icon">△</span><span class="eyebrow">Diagnose</span><h3>RTL-aware, project-aware lint</h3><p>Seventeen focused rules, safe fixes, source waivers, and semantic checks that understand the whole workspace.</p></a><a class="capability-card wide" href="/reference/language-tools/#workspace-lifecycle"><span class="capability-icon">▱</span><span class="eyebrow">Workspace</span><h3>Built for real RTL trees</h3><p>EDA filelists, nested includes, defines, Git-style ignores, multi-root indexes, live overlays, and hierarchy-aware search all work together.</p><span class="mini-flow"><b>sources.f</b><i>→</i><b>preprocess</b><i>→</i><b>semantic index</b><i>→</i><b>editor + CI</b></span></a></div><section class="terminal-band"><div><span class="section-kicker"><i></i> Same engine, anywhere</span><h2>Editor-fast. CI-certain.</h2><p>Use <code>lucisv-server</code> from any LSP client, then enforce the exact same formatting and diagnostics with the standalone CLI.</p><a href="/start/quick-start/">Set up your editor →</a></div><pre aria-label="lucisv command line examples"><code><span class="prompt">$</span> lucisv –check rtl/<br><span class="ok">✓</span> 184 files already formatted<br><br><span class="prompt">$</span> lucisv check rtl/<br><span class="ok">✓</span> no diagnostics · 0.42s</code></pre></section><aside aria-label="Open by design" class="starlight-aside starlight-aside--note"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path d="M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1Zm.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.15 1.15 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21ZM12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20Z"/></svg>Open by design</p><div class="starlight-aside__content"><p>lucisv is MIT licensed. The CLI, parser, formatter, linter, semantic engine, refactoring engine, language server, and editor integrations all live in the same Rust workspace.</p></div></aside></div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/index.mdx" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-08-27T03:31:44.000Z">Aug 27, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/start/quick-start/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astrLine truncated
|
||||
<div class="capability-grid"><a class="capability-card featured" href="/reference/language-tools/#navigation-and-understanding"><span class="capability-icon">⌁</span><span class="eyebrow">Navigate</span><h3>Follow the design, not the files</h3><p>Jump through definitions, references, implementations, document symbols, workspace symbols, type definitions, and call and type hierarchies.</p><span class="card-link">Explore navigation →</span></a><a class="capability-card" href="/reference/language-tools/#editing-and-formatting"><span class="capability-icon">⌘</span><span class="eyebrow">Complete</span><h3>Context-aware suggestions</h3><p>Complete symbols, members, ports, parameters, named associations, macros, keywords, and include paths.</p></a><a class="capability-card" href="/reference/language-tools/#refactoring"><span class="capability-icon">↗</span><span class="eyebrow">Refactor</span><h3>Make project-wide changes safely</h3><p>Rename symbols, organize imports, remove unused imports, and apply quick fixes with previewable workspace edits.</p></a><a class="capability-card" href="/guides/formatter/"><span class="capability-icon">≡</span><span class="eyebrow">Format</span><h3>Deterministic by construction</h3><p>Width-aware layout, preserved comments, inferred alignment, format fences, range formatting, and idempotency checks.</p></a><a class="capability-card" href="/reference/rules/"><span class="capability-icon">△</span><span class="eyebrow">Diagnose</span><h3>RTL-aware, project-aware lint</h3><p>Seventeen focused rules, safe fixes, source waivers, and semantic checks that understand the whole workspace.</p></a><a class="capability-card wide" href="/reference/language-tools/#workspace-lifecycle"><span class="capability-icon">▱</span><span class="eyebrow">Workspace</span><h3>Built for real RTL trees</h3><p>EDA filelists, nested includes, defines, Git-style ignores, multi-root indexes, live overlays, and hierarchy-aware search all work together.</p><span class="mini-flow"><b>sources.f</b><i>→</i><b>preprocess</b><i>→</i><b>semantic index</b><i>→</i><b>editor + CI</b></span></a></div><section class="terminal-band"><div><span class="section-kicker"><i></i> Same engine, anywhere</span><h2>Editor-fast. CI-certain.</h2><p>Use <code>lucisv-server</code> from any LSP client, then enforce the exact same formatting and diagnostics with the standalone CLI.</p><a href="/start/quick-start/">Set up your editor →</a></div><pre aria-label="lucisv command line examples"><code><span class="prompt">$</span> lucisv –check rtl/<br><span class="ok">✓</span> 184 files already formatted<br><br><span class="prompt">$</span> lucisv check rtl/<br><span class="ok">✓</span> no diagnostics · 0.42s</code></pre></section><aside aria-label="Open by design" class="starlight-aside starlight-aside--note"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path d="M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1Zm.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.15 1.15 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21ZM12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20Z"/></svg>Open by design</p><div class="starlight-aside__content"><p>lucisv is MIT licensed. The CLI, parser, formatter, linter, semantic engine, refactoring engine, language server, and editor integrations all live in the same Rust workspace.</p></div></aside></div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/index.mdx" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-03T09:28:11.000Z">Sep 3, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/start/quick-start/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astroLine truncated
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
||||
{"version":"1.5.2","languages":{"en":{"hash":"en_be5ced3c43","wasm":"en","page_count":12}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
|
||||
{"version":"1.5.2","languages":{"en":{"hash":"en_db82295a7c","wasm":"en","page_count":12}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
|
||||
Binary file not shown.
Binary file not shown.
+36
-6
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Architecture | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/architecture/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Architecture"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/architecture/"/><meta property="og:locale" content="en"/><meta property="og:description" content="How lucisv’s parser, formatter, linter, semantics, refactors, CLI, and language server fit together."/><meta name="description" content="How lucisv’s parser, formatter, linter, semantics, refactors, CLI, and language server fit together."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Architecture | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/architecture/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Architecture"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/architecture/"/><meta property="og:locale" content="en"/><meta property="og:description" content="How lucisv’s parser, formatter, linter, semantics, refactors, CLI, and language server fit together."/><meta name="description" content="How lucisv’s parser, formatter, linter, semantics, refactors, CLI, and language server fit together."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -70,7 +70,7 @@
|
||||
})();
|
||||
</script></sl-sidebar-state-persist><div class="md:sl-hidden"><div class="mobile-preferences sl-flex astro-b5gddk54"><div class="social-icons astro-b5gddk54"><a href="https://git.luci.ooo/lucio/verilogrustformatter" rel="me" class="sl-flex astro-cg55etiy"><span class="sr-only astro-cg55etiy">Source repository</span><svg aria-hidden="true" class="astro-cg55etiy astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a></div><starlight-theme-select><label style="--sl-select-width: 6.25em" class="astro-r2p65idu"><span class="sr-only astro-r2p65idu">Select theme</span><svg aria-hidden="true" class="icon label-icon astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg><select autocomplete="off" class="astro-r2p65idu"><option value="dark" class="astro-r2p65idu">Dark</option><option value="light" class="astro-r2p65idu">Light</option><option value="auto" selected class="astro-r2p65idu">Auto</option></select><svg aria-hidden="true" class="icon caret astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg></label></starlight-theme-select><script>
|
||||
StarlightThemeProvider.updatePickers();
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#data-flow" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Data flow</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#design-invariants" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Design invariants</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#release-surface" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Release surface</span></a></li></ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.BcSo_yiZ.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-q5mffni3"><div class="sl-container astro-q5mffni3"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#data-flow" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Data flow</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#design-invariants" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Design invariants</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#release-surface" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Release surface</span></a></li></ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.Csloo1VZ.js"></script></div></div></div></aside><div class="main-pane astro-abfeecmu"><main data-pagefind-body class="astro-vdxcvpsm" lang="en" dir="ltr"><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><h1 id="_top" class="astro-2sm4b3ln">Architecture</h1></div></div><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><div class="sl-markdown-content"><p>lucisv follows the same separation of concerns that makes ruff fast and maintainable: syntax and source fidelity at the bottom, reusable analysis and transformations in the middle, and thin product surfaces at the top.</p>
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#data-flow" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Data flow</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#execution-paths-and-ownership" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Execution paths and ownership</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#design-invariants" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Design invariants</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#release-surface" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Release surface</span></a></li></ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.BcSo_yiZ.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-q5mffni3"><div class="sl-container astro-q5mffni3"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#data-flow" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Data flow</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#execution-paths-and-ownership" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Execution paths and ownership</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#design-invariants" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Design invariants</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#release-surface" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Release surface</span></a></li></ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.Csloo1VZ.js"></script></div></div></div></aside><div class="main-pane astro-abfeecmu"><main data-pagefind-body class="astro-vdxcvpsm" lang="en" dir="ltr"><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><h1 id="_top" class="astro-2sm4b3ln">Architecture</h1></div></div><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><div class="sl-markdown-content"><p>lucisv follows the same separation of concerns that makes ruff fast and maintainable: syntax and source fidelity at the bottom,Line truncated
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -107,12 +107,12 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">lucisv_core</code></td>
|
||||
<td>configuration, filelists, walking, exclusions, cache</td>
|
||||
<td>configuration, filelists, walking, exclusions, cache, atomic replacement</td>
|
||||
<td>CLI and language server</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">lucisv</code></td>
|
||||
<td>argument parsing, parallel processing, output, atomic writes</td>
|
||||
<td>argument parsing, parallel per-file processing, reports, write orchestration</td>
|
||||
<td>command-line users and CI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -134,15 +134,45 @@
|
||||
<div><b>refactor</b>Plans and non-overlapping workspace edits.</div>
|
||||
<div><b>LSP</b>Queries, diagnostics, navigation, UI actions.</div>
|
||||
</div>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="execution-paths-and-ownership">Execution paths and ownership</h2><a class="sl-anchor-link" href="#execution-paths-and-ownership"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Execution paths and ownership”</span></a></div>
|
||||
<ul>
|
||||
<li><strong>Format:</strong> strict parse → AST-to-document layout → width-aware printer →
|
||||
normalized token comparison → second parse/format and convergence check.
|
||||
Only a verified string is returned. Ranges splice whole items; format fences
|
||||
also protect statement scopes, and verification covers the complete output.</li>
|
||||
<li><strong>Lint:</strong> <code dir="auto">ParsedSource</code> bundles one tokenization and tolerant parse;
|
||||
<code dir="auto">LintContext</code> supplies source facts and lazy semantics. The registry selects
|
||||
73 rules with severities and validated options. Inline waivers filter findings,
|
||||
and the front ends protect fenced bytes before applying fixes.</li>
|
||||
<li><strong>Refactor:</strong> parsed spans and resolved references produce an edit plan;
|
||||
the engine checks the whole candidate edit before returning it. Server source
|
||||
selectors bound the input set but must include every file the engine might
|
||||
edit or refuse over. No formatter dependency is involved.</li>
|
||||
<li><strong>Editor:</strong> one ordered synchronous loop owns <code dir="auto">Workspace</code>; open documents
|
||||
overlay disk facts. Scans publish index/include/completion batches together.
|
||||
Closed-file facts persist under codec 17; a bounded file-view cache serves
|
||||
queries that still need source text. Lazy port actions defer the edit until
|
||||
selection; recorded file-scope definition positions avoid a closed-file read.</li>
|
||||
</ul>
|
||||
<p><code dir="auto">vlog_parser</code> and <code dir="auto">lucisv_core</code> depend on no other crates. Formatting and
|
||||
semantics each depend on the parser; linting and refactoring depend on parser
|
||||
and semantics. The CLI composes core, parser, formatter, and linter; the server
|
||||
composes all six libraries. The linter’s formatter dependency is test-only.
|
||||
External dependencies are confined to the CLI worker pool (<code dir="auto">rayon</code>) and the
|
||||
server’s synchronous LSP/JSON stack.</p>
|
||||
<p>The main change-impact boundaries are the AST and all its walkers, formatter
|
||||
verification, persisted semantic facts, server state/ordering, and matching
|
||||
server/editor setting names. Source modules are split by grammar domain under
|
||||
<code dir="auto">parser/</code>, <code dir="auto">ast/</code>, <code dir="auto">format/</code>, <code dir="auto">bind/</code>, <code dir="auto">workspace/</code>, <code dir="auto">ports/</code>, and <code dir="auto">server/</code>.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="design-invariants">Design invariants</h2><a class="sl-anchor-link" href="#design-invariants"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Design invariants”</span></a></div>
|
||||
<ul>
|
||||
<li><strong>Source fidelity:</strong> comments and blank-line intent survive the parser.</li>
|
||||
<li><strong>Determinism:</strong> worker scheduling never affects ordering, formatting, or exit codes.</li>
|
||||
<li><strong>Fixed points:</strong> formatter tests require the second pass to match the first.</li>
|
||||
<li><strong>Fixed points:</strong> every successful formatting call requires the second pass to match the first.</li>
|
||||
<li><strong>Conservative analysis:</strong> incomplete cross-file knowledge produces false negatives rather than noisy false positives.</li>
|
||||
<li><strong>Shared answers:</strong> CLI and editor features call the same library APIs.</li>
|
||||
<li><strong>Recoverable state:</strong> caches are disposable; open buffers remain authoritative while an editor session is active.</li>
|
||||
</ul>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="release-surface">Release surface</h2><a class="sl-anchor-link" href="#release-surface"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Release surface”</span></a></div>
|
||||
<p>One release builds the <code dir="auto">lucisv</code> and <code dir="auto">lucisv-server</code> binaries for Apple Silicon and Intel macOS, static-musl and RHEL-compatible glibc Linux, and Windows, plus the VS Code <code dir="auto">.vsix</code> and checksums. The release tooling audits file type, dynamic linkage, and the glibc ceiling for cross-built artifacts.</p>
|
||||
<p>The supported publication surface is seven VS Code <code dir="auto">.vsix</code> packages plus checksums: five platform packages (Apple Silicon/Intel macOS, x86-64/ARM64 static-musl Linux, Windows), one all-platform package, and one universal package requiring binaries on <code dir="auto">PATH</code>. Both <code dir="auto">lucisv</code> and <code dir="auto">lucisv-server</code> are bundled in platform packages. Standalone binaries are built by the tooling but are not published as release assets. The release tooling audits file type, dynamic linkage, and the glibc ceiling for cross-built artifacts.</p>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/reference/architecture.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-08-27T03:31:44.000Z">Aug 27, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/reference/rust-api/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Rust API index</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
+12
-7
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>CLI reference | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/cli/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="CLI reference"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/cli/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Complete command, option, input, output, and exit-code reference for lucisv."/><meta name="description" content="Complete command, option, input, output, and exit-code reference for lucisv."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>CLI reference | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/cli/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="CLI reference"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/cli/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Complete command, option, input, output, and exit-code reference for lucisv."/><meta name="description" content="Complete command, option, input, output, and exit-code reference for lucisv."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -206,13 +206,13 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code dir="auto">--select</code></td>
|
||||
<td>rule list</td>
|
||||
<td>Replace defaults with named rules; comma-separated and repeatable</td>
|
||||
<td>rule/class list</td>
|
||||
<td>Replace defaults with named rules or <code dir="auto">error</code>, <code dir="auto">warning</code>, <code dir="auto">style</code>; comma-separated and repeatable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">--ignore</code></td>
|
||||
<td>rule list</td>
|
||||
<td>Remove named rules from the enabled set</td>
|
||||
<td>rule/class list</td>
|
||||
<td>Remove named rules or severity classes from the enabled set</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">--output-format</code></td>
|
||||
@@ -229,11 +229,16 @@
|
||||
<td>—</td>
|
||||
<td>Allow unsafe fixes when a rule provides them</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">--rules-doc</code></td>
|
||||
<td>—</td>
|
||||
<td>Print registry-generated rule and option documentation and exit; takes no files</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Text diagnostics use <code dir="auto">FILE:LINE:COL: message [rule]</code>. JSON output is one array of diagnostic objects.</p>
|
||||
<p>Text diagnostics use <code dir="auto">FILE:LINE:COL: severity: message [rule]</code>. JSON output is one array of diagnostic objects, each carrying <code dir="auto">severity</code>. JSON output is lint-only; formatter errors remain text on stderr.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="filelists">Filelists</h2><a class="sl-anchor-link" href="#filelists"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Filelists”</span></a></div>
|
||||
<p>An EDA <code dir="auto">.f</code> filelist accepts one source path per line, nested <code dir="auto">-f</code> entries, <code dir="auto">+incdir+</code>, <code dir="auto">+define+</code>, <code dir="auto">#</code> or <code dir="auto">//</code> comments, and <code dir="auto">$VAR</code>/<code dir="auto">${VAR}</code> expansion. Paths resolve relative to the filelist that names them. Include and define options are accepted but ignored because lucisv does not preprocess.</p>
|
||||
<p>An EDA <code dir="auto">.f</code> filelist accepts one source path per line, nested <code dir="auto">-f</code> entries, <code dir="auto">+incdir+</code>, <code dir="auto">+define+</code>, <code dir="auto">#</code> or <code dir="auto">//</code> comments, and <code dir="auto">$VAR</code>/<code dir="auto">${VAR}</code> expansion. Paths resolve relative to the filelist that names them. The CLI accepts include and define options without preprocessing. The server uses include directories for include navigation; neither front end expands cross-file macros while parsing.</p>
|
||||
<p>Filelist paths bypass <code dir="auto">--exclude</code> and <code dir="auto">.gitignore</code>, just like direct command-line files. Duplicates are processed once. Unknown options, unset variables, and missing listed files warn without changing the exit code; an unreadable filelist is an error.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="ignore-patterns">Ignore patterns</h2><a class="sl-anchor-link" href="#ignore-patterns"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Ignore patterns”</span></a></div>
|
||||
<p>Directory walks read <code dir="auto">.gitignore</code> in each directory. Deeper rules override shallower rules; the last matching line wins. Supported syntax includes comments, blank lines, <code dir="auto">*</code> within a component, anchored <code dir="auto">/</code>, directory-only trailing <code dir="auto">/</code>, and <code dir="auto">!</code> negation. <code dir="auto">**</code>, <code dir="auto">?</code>, character classes, escapes, global excludes, and tracked-file exceptions are not implemented.</p>
|
||||
|
||||
+16
-3
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Language tools | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/language-tools/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Language tools"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/language-tools/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Complete index of the editor and Language Server Protocol capabilities provided by lucisv-server."/><meta name="description" content="Complete index of the editor and Language Server Protocol capabilities provided by lucisv-server."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Language tools | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/language-tools/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Language tools"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/language-tools/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Complete index of the editor and Language Server Protocol capabilities provided by lucisv-server."/><meta name="description" content="Complete index of the editor and Language Server Protocol capabilities provided by lucisv-server."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -244,7 +244,12 @@
|
||||
<tr>
|
||||
<td>Quick fixes</td>
|
||||
<td><code dir="auto">textDocument/codeAction</code></td>
|
||||
<td>Exposes safe lint fixes and bulk safe fixes</td>
|
||||
<td>Exposes safe lint fixes, bulk safe fixes, and port refactor offers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Resolve port action</td>
|
||||
<td><code dir="auto">codeAction/resolve</code></td>
|
||||
<td>Computes a selected port edit against current workspace state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Execute command</td>
|
||||
@@ -253,6 +258,14 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Port edits are deferred when the client advertises code-action resolve support
|
||||
for <code dir="auto">edit</code>; other clients receive eager edits. Lint fixes remain eager. An
|
||||
inapplicable or stale port action is rejected when resolved. Closed-file
|
||||
file-scope definition and workspace-symbol locations use recorded index
|
||||
positions; member locations and open buffers still use current text.</p>
|
||||
<p>Inlay hints require the instantiated module to be in the active index scope.
|
||||
A missing hint can therefore be a scope limitation; use a filelist or workspace
|
||||
index scope when the defining module lives outside the default folder scope.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="refactoring">Refactoring</h2><a class="sl-anchor-link" href="#refactoring"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Refactoring”</span></a></div>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -329,4 +342,4 @@
|
||||
</table>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="workspace-lifecycle">Workspace lifecycle</h2><a class="sl-anchor-link" href="#workspace-lifecycle"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Workspace lifecycle”</span></a></div>
|
||||
<p>The server handles <code dir="auto">didOpen</code>, incremental <code dir="auto">didChange</code>, <code dir="auto">didSave</code>, <code dir="auto">didClose</code>, watched-file changes, configuration changes, cancellation, shutdown, and exit. It dynamically registers file watchers, emits work-done progress while building large indexes, coalesces code-lens refreshes, and promotes open-buffer overlays into the workspace without waiting for disk writes.</p>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/reference/language-tools.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-08-27T03:31:44.000Z">Aug 27, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/reference/rules/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Lint rules</span></span></a><a href="/reference/rust-api/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Rust API index</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/reference/language-tools.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-03T09:28:11.000Z">Sep 3, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/reference/rules/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Lint rules</span></span></a><a href="/reference/rust-api/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Rust API index</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
+531
-3
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Lint rules | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/rules/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Lint rules"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/rules/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Complete reference for all seventeen lucisv lint rules, their defaults, fixes, and rationale."/><meta name="description" content="Complete reference for all seventeen lucisv lint rules, their defaults, fixes, and rationale."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Lint rules | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/rules/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Lint rules"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/rules/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Complete reference for every lucisv lint rule, its severity, default, fix, and rationale."/><meta name="description" content="Complete reference for every lucisv lint rule, its severity, default, fix, and rationale."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -70,12 +70,19 @@
|
||||
})();
|
||||
</script></sl-sidebar-state-persist><div class="md:sl-hidden"><div class="mobile-preferences sl-flex astro-b5gddk54"><div class="social-icons astro-b5gddk54"><a href="https://git.luci.ooo/lucio/verilogrustformatter" rel="me" class="sl-flex astro-cg55etiy"><span class="sr-only astro-cg55etiy">Source repository</span><svg aria-hidden="true" class="astro-cg55etiy astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a></div><starlight-theme-select><label style="--sl-select-width: 6.25em" class="astro-r2p65idu"><span class="sr-only astro-r2p65idu">Select theme</span><svg aria-hidden="true" class="icon label-icon astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg><select autocomplete="off" class="astro-r2p65idu"><option value="dark" class="astro-r2p65idu">Dark</option><option value="light" class="astro-r2p65idu">Light</option><option value="auto" selected class="astro-r2p65idu">Auto</option></select><svg aria-hidden="true" class="icon caret astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg></label></starlight-theme-select><script>
|
||||
StarlightThemeProvider.updatePickers();
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#always-comb-blocking" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">always-comb-blocking</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#always-ff-non-blocking" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">always-ff-non-blocking</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#case-missing-default" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">case-missing-default</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#empty-item" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">empty-item</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#enum-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">enum-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#explicit-parameter-storage-type" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">explicit-parameter-storage-type</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#module-filename" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">module-filename</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#module-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">module-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#multiply-driven" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">multiply-driven</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#no-tabs" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">no-tabs</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#no-trailing-whitespace" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">no-trailing-whitespace</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#parameter-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">parameter-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#struct-union-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">struct-union-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#undriven-net" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">undriven-net</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#unused-signal" style="--depth: 0;" claLine truncated
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#always-comb-blocking" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">always-comb-blocking</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#always-ff-non-blocking" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">always-ff-non-blocking</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#case-missing-default" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">case-missing-default</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#empty-item" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">empty-item</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#enum-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">enum-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#explicit-parameter-storage-type" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">explicit-parameter-storage-type</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#module-filename" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">module-filename</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#module-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">module-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#multiply-driven" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">multiply-driven</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#no-tabs" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">no-tabs</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#no-trailing-whitespace" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">no-trailing-whitespace</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#parameter-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">parameter-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#struct-union-name-style" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">struct-union-name-style</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#undriven-net" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">undriven-net</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#unused-signal" style="--depth: 0;" claLine truncated
|
||||
<p>Every rule is in one of three <strong>severity</strong> classes. <code dir="auto">error</code> is code that would very likely fail to compile, elaborate or synthesize; <code dir="auto">warning</code> is code that compiles and very likely does not mean what it says; <code dir="auto">style</code> is code that is correct and reads badly. The class is the word in the CLI diagnostic line (<code dir="auto">FILE:LINE:COL: warning: …</code>), the <code dir="auto">severity</code> field of <code dir="auto">--output-format json</code>, and the colour of the editor’s squiggle — and it is accepted wherever a rule name is, so <code dir="auto">--ignore style</code> and <code dir="auto">--select error</code> both work.</p>
|
||||
<p>Every <code dir="auto">error</code>-class rule is held to one discipline: it goes <strong>silent whenever the run cannot answer</strong> — a file that did not fully parse, a module the project does not hold or holds twice, a name a macro produces, a fragment written to be <code dir="auto"> `include</code>d. A wrong accusation in that class is worse than a hundred missed ones.</p>
|
||||
<p>This page is hand-written prose. The generated truth is <code dir="auto">lucisv check --rules-doc</code>, which prints every rule with its class, default, fix and rationale straight from the registry — <strong>and every option a rule takes, with its kind and default</strong>.</p>
|
||||
<p>A configurable rule is configured in a <code dir="auto">[lint.<rule-name>]</code> table of a <code dir="auto">lucisv.toml</code>, or from an editor in the <code dir="auto">lucisv.lint.options</code> object; the option names are Verible’s wherever it has the same option. An unknown rule or option name, a value of the wrong kind, an out-of-range integer or a pattern that does not compile fails a CLI run naming the file and the line. Invalid editor option settings are logged and dropped; invalid project-file option entries are currently dropped silently by server linting.</p>
|
||||
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.w36nc.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="toml"><code><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">[lint.line-length]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">length</span><span style="--0:#D6DEEB;--1:#403F53"> = </span><span style="--0:#F78C6C;--1:#AA0982">120</span></div></div><div class="ec-line"><div class="code">
|
||||
</div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">[lint.typedef-structs-unions]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">allow_anonymous_nested</span><span style="--0:#D6DEEB;--1:#403F53"> = </span><span style="--0:#FF6A83;--1:#A24848">true</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="[lint.line-length]length = 120[lint.typedef-structs-unions]allow_anonymous_nested = true"><div></div></button></div></figure></div>
|
||||
<p>A rule marked <strong>on (project)</strong> runs by default only where lucisv can see the other files of your project — <code dir="auto">lucisv check <dir></code>, or the language server. Over a single file or a stdin buffer it is off and must be <code dir="auto">--select</code>ed, because its one false-positive mode is a use in another file. Turn any rule off with <code dir="auto">--ignore</code>, with <code dir="auto">ignore</code> under <code dir="auto">[lint]</code> in <code dir="auto">lucisv.toml</code>, or with <code dir="auto">lucisv.lint.ignore</code> in your editor.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rule</th>
|
||||
<th style="text-align: center">Severity</th>
|
||||
<th style="text-align: center">Default</th>
|
||||
<th style="text-align: center">Fix</th>
|
||||
<th>Purpose</th>
|
||||
@@ -83,107 +90,516 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="#always-comb"><code dir="auto">always-comb</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">unsafe</td>
|
||||
<td>Write <code dir="auto">always_comb</code>, not <code dir="auto">always @*</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#banned-declared-name-patterns"><code dir="auto">banned-declared-name-patterns</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Ban the names your project has decided against</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#constraint-name-style"><code dir="auto">constraint-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name constraints <code dir="auto">lower_snake_case</code> ending <code dir="auto">_c</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#explicit-begin"><code dir="auto">explicit-begin</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Wrap every body in <code dir="auto">begin ... end</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#forbid-consecutive-null-statements"><code dir="auto">forbid-consecutive-null-statements</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Drop a <code dir="auto">;</code> that follows a <code dir="auto">;</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#generate-label"><code dir="auto">generate-label</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Label every generate block</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#generate-label-prefix"><code dir="auto">generate-label-prefix</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Prefix that label <code dir="auto">g_</code> or <code dir="auto">gen_</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#interface-name-style"><code dir="auto">interface-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name interfaces <code dir="auto">lower_snake_case</code> ending <code dir="auto">_if</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#line-length"><code dir="auto">line-length</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Keep lines within the configured width</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#macro-name-style"><code dir="auto">macro-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name macros <code dir="auto">ALL_CAPS</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#one-module-per-file"><code dir="auto">one-module-per-file</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Declare one module per file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#package-filename"><code dir="auto">package-filename</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Match one-package files to package names</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#parameter-type-name-style"><code dir="auto">parameter-type-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name <code dir="auto">type</code> parameters <code dir="auto">lower_snake_case</code> ending <code dir="auto">_t</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#port-name-suffix"><code dir="auto">port-name-suffix</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Say a port’s direction in its name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#posix-eof"><code dir="auto">posix-eof</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>End the file with a newline</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#signal-name-style"><code dir="auto">signal-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name signals <code dir="auto">lower_snake_case</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#typedef-enums"><code dir="auto">typedef-enums</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name an <code dir="auto">enum</code> type with a <code dir="auto">typedef</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#typedef-structs-unions"><code dir="auto">typedef-structs-unions</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name a <code dir="auto">struct</code>/<code dir="auto">union</code> type with a <code dir="auto">typedef</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#always-comb-blocking"><code dir="auto">always-comb-blocking</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Use <code dir="auto">=</code> inside <code dir="auto">always_comb</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#always-ff-non-blocking"><code dir="auto">always-ff-non-blocking</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Use <code dir="auto"><=</code> inside <code dir="auto">always_ff</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#case-missing-default"><code dir="auto">case-missing-default</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Give every case a default branch</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#duplicate-declaration"><code dir="auto">duplicate-declaration</code></a></td>
|
||||
<td style="text-align: center">error</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Declare each name once per scope</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#empty-item"><code dir="auto">empty-item</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Drop a <code dir="auto">;</code> that stands where an item belongs</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#enum-name-style"><code dir="auto">enum-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name enum typedefs with <code dir="auto">_e</code> or <code dir="auto">_t</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#explicit-function-task-parameter-type"><code dir="auto">explicit-function-task-parameter-type</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Type every function and task argument</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#explicit-parameter-storage-type"><code dir="auto">explicit-parameter-storage-type</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Declare parameter storage types</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#forbid-defparam"><code dir="auto">forbid-defparam</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Override at the instantiation, not with <code dir="auto">defparam</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#forbid-negative-array-dim"><code dir="auto">forbid-negative-array-dim</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Keep negative literals out of dimensions</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#incomplete-assignment"><code dir="auto">incomplete-assignment</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Assign on every path of an <code dir="auto">always_comb</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#instance-shadowing"><code dir="auto">instance-shadowing</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Do not hide an enclosing declaration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#invalid-system-task-function"><code dir="auto">invalid-system-task-function</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Avoid deprecated and non-reproducible system tasks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#mismatched-labels"><code dir="auto">mismatched-labels</code></a></td>
|
||||
<td style="text-align: center">error</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Make an end label name its own block</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#module-filename"><code dir="auto">module-filename</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Match one-module files to module names</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#module-name-style"><code dir="auto">module-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Use lower_snake_case module names</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#module-parameter"><code dir="auto">module-parameter</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Override more than one parameter by name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#module-port"><code dir="auto">module-port</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Connect more than one port by name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#multiply-driven"><code dir="auto">multiply-driven</code></a></td>
|
||||
<td style="text-align: center">error</td>
|
||||
<td style="text-align: center">on (project)</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Give variables one driver</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#no-tabs"><code dir="auto">no-tabs</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Use spaces outside string literals</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#no-trailing-whitespace"><code dir="auto">no-trailing-whitespace</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Remove end-of-line whitespace</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#packed-dimensions-range-ordering"><code dir="auto">packed-dimensions-range-ordering</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Write a packed dimension <code dir="auto">[N-1:0]</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#parameter-name-style"><code dir="auto">parameter-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Use CamelCase or ALL_CAPS parameters</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#plusarg-assignment"><code dir="auto">plusarg-assignment</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Read a plusarg with <code dir="auto">$value$plusargs</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#struct-union-name-style"><code dir="auto">struct-union-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name aggregate typedefs with <code dir="auto">_t</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#suspicious-semicolon"><code dir="auto">suspicious-semicolon</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>No <code dir="auto">if (x);</code> or <code dir="auto">while (x);</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#truncated-numeric-literal"><code dir="auto">truncated-numeric-literal</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Keep a sized literal inside its width</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#undeclared-identifier"><code dir="auto">undeclared-identifier</code></a></td>
|
||||
<td style="text-align: center">error</td>
|
||||
<td style="text-align: center">on (project)</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Use a name something declares</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#undersized-binary-literal"><code dir="auto">undersized-binary-literal</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Write every bit of a sized binary literal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#undriven-net"><code dir="auto">undriven-net</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on (project)</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Drive signals that are read</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#unknown-parameter"><code dir="auto">unknown-parameter</code></a></td>
|
||||
<td style="text-align: center">error</td>
|
||||
<td style="text-align: center">on (project)</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Override only parameters the module declares</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#unknown-port"><code dir="auto">unknown-port</code></a></td>
|
||||
<td style="text-align: center">error</td>
|
||||
<td style="text-align: center">on (project)</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Connect only ports the module declares</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#unused-signal"><code dir="auto">unused-signal</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on (project)</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Detect unreferenced internal signals</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#unused-waiver"><code dir="auto">unused-waiver</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Remove ineffective suppressions</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#void-cast"><code dir="auto">void-cast</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Cast to <code dir="auto">void</code> only what a call returns</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#wire-reg-mixup"><code dir="auto">wire-reg-mixup</code></a></td>
|
||||
<td style="text-align: center">error</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Prefer <code dir="auto">logic</code> to <code dir="auto">reg</code> in SystemVerilog</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#create-object-name-match"><code dir="auto">create-object-name-match</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name a <code dir="auto">type_id::create</code> after its handle</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#dff-name-style"><code dir="auto">dff-name-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name a flip-flop <code dir="auto">_q</code> and its input <code dir="auto">_d</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#disable-statement"><code dir="auto">disable-statement</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Write <code dir="auto">disable fork</code>, not a fork label</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#endif-comment"><code dir="auto">endif-comment</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Say what an <code dir="auto">`endif</code> closes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#explicit-function-lifetime"><code dir="auto">explicit-function-lifetime</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>State a function’s lifetime outside a class</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#explicit-task-lifetime"><code dir="auto">explicit-task-lifetime</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>State a task’s lifetime outside a class</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#forbid-line-continuations"><code dir="auto">forbid-line-continuations</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Do not break a string with a backslash</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#forbidden-macro"><code dir="auto">forbidden-macro</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Ban the macros your project has decided against</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#legacy-generate-region"><code dir="auto">legacy-generate-region</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Drop the <code dir="auto">generate … endgenerate</code> wrapper</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#legacy-genvar-declaration"><code dir="auto">legacy-genvar-declaration</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Declare a genvar in the <code dir="auto">for</code> header</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#macro-string-concatenation"><code dir="auto">macro-string-concatenation</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Do not put <code dir="auto"> </code> `` in a plain string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#module-begin-block"><code dir="auto">module-begin-block</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>No <code dir="auto">begin</code>/<code dir="auto">end</code> at module scope</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#numeric-format-string-style"><code dir="auto">numeric-format-string-style</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Match a radix prefix to its specifier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#positive-meaning-parameter-name"><code dir="auto">positive-meaning-parameter-name</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Name a parameter for what it enables</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#proper-parameter-declaration"><code dir="auto">proper-parameter-declaration</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td><code dir="auto">parameter</code> in a header, <code dir="auto">localparam</code> in a body</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#suggest-parentheses"><code dir="auto">suggest-parentheses</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">safe</td>
|
||||
<td>Parenthesize a conditional inside a conditional</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#unpacked-dimensions-range-ordering"><code dir="auto">unpacked-dimensions-range-ordering</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>Write an unpacked dimension <code dir="auto">[0:N-1]</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#uvm-macro-semicolon"><code dir="auto">uvm-macro-semicolon</code></a></td>
|
||||
<td style="text-align: center">warning</td>
|
||||
<td style="text-align: center">off</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>No <code dir="auto">;</code> after a <code dir="auto">`uvm_*</code> macro</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#v2001-generate-begin"><code dir="auto">v2001-generate-begin</code></a></td>
|
||||
<td style="text-align: center">style</td>
|
||||
<td style="text-align: center">on</td>
|
||||
<td style="text-align: center">—</td>
|
||||
<td>No bare <code dir="auto">begin</code> in a generate region</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="always-comb-blocking">always-comb-blocking</h2><a class="sl-anchor-link" href="#always-comb-blocking"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “always-comb-blocking”</span></a></div>
|
||||
@@ -220,4 +636,116 @@
|
||||
<p>Reports malformed, unknown, or ineffective waiver comments when their target rule is enabled. A waiver for a disabled rule is not judged.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="wire-reg-mixup">wire-reg-mixup</h2><a class="sl-anchor-link" href="#wire-reg-mixup"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “wire-reg-mixup”</span></a></div>
|
||||
<p>Reports <code dir="auto">reg</code> in <code dir="auto">.sv</code> and <code dir="auto">.svh</code> files and recommends <code dir="auto">logic</code>. Verilog <code dir="auto">.v</code>/<code dir="auto">.vh</code> files and unnamed stdin are exempt; <code dir="auto">wire</code> remains valid and is never flagged.</p>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/reference/rules.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-02T16:06:08.000Z">Sep 2, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/reference/cli/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">CLI</span></span></a><a href="/reference/language-tools/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Language tools</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="duplicate-declaration">duplicate-declaration</h2><a class="sl-anchor-link" href="#duplicate-declaration"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “duplicate-declaration”</span></a></div>
|
||||
<p>Reports a name a scope binds twice — two signals, two parameters, two typedefs, two instances. It is silent whenever the second declaration might be legal: a <strong>port</strong> on either side (a non-ANSI port is completed by its body declarations, all legally), a function, task, class, constraint, covergroup, property, sequence, modport or clocking name (each has a prototype-plus-definition or forward-declaration form), an enum <strong>name range</strong> (<code dir="auto">Gpr[0:2]</code> declares a run of members under one written identifier), a <code dir="auto">generate</code> scope, a pair separated by a conditional-compilation directive, the file scope, and any file that did not fully parse. Measured on opentitan: 18 findings before those exclusions, all of them phantoms from one 454-error UVM file, and 0 after.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="explicit-function-task-parameter-type">explicit-function-task-parameter-type</h2><a class="sl-anchor-link" href="#explicit-function-task-parameter-type"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “explicit-function-task-parameter-type”</span></a></div>
|
||||
<p>Reports a task or function formal with no storage type, which the language makes a one-bit <code dir="auto">logic</code> (IEEE 1800 §13.3). Only the argument that <em>opens</em> a declaration is judged — a continuation (<code dir="auto">f(input int a, b)</code>) inherits — and a DPI import’s unnamed formal is not this rule’s subject. Verible’s <code dir="auto">explicit-function-task-parameter-type</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="forbid-defparam">forbid-defparam</h2><a class="sl-anchor-link" href="#forbid-defparam"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “forbid-defparam”</span></a></div>
|
||||
<p>Reports <code dir="auto">defparam</code>, deprecated since IEEE 1800-2009 and rejected outright by several synthesis tools. The <code dir="auto">#(.NAME(value))</code> override at the instantiation says the same thing where the instance is. Verible’s <code dir="auto">forbid-defparam</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="forbid-negative-array-dim">forbid-negative-array-dim</h2><a class="sl-anchor-link" href="#forbid-negative-array-dim"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “forbid-negative-array-dim”</span></a></div>
|
||||
<p>Reports a written negative literal inside a dimension, packed or unpacked — the shape <code dir="auto">[WIDTH-1:0]</code> collapses to when <code dir="auto">WIDTH</code> comes out zero. Only a literal is judged; an expression that would evaluate negative needs parameter values lucisv does not have. Verible ships this off; lucisv turns it on, because a negative literal spelled out in a dimension has no legitimate reading.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="incomplete-assignment">incomplete-assignment</h2><a class="sl-anchor-link" href="#incomplete-assignment"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “incomplete-assignment”</span></a></div>
|
||||
<p>Reports a variable an <code dir="auto">always_comb</code> writes under an <code dir="auto">if</code> with no <code dir="auto">else</code>, or in some arms of a <code dir="auto">default</code>-less <code dir="auto">case</code>, and nowhere unconditionally before — a latch inferred where none was wanted. Conservative by construction: it reads only the top level of the block, treats a partial write and an every-arm <code dir="auto">if</code>/<code dir="auto">else</code> or <code dir="auto">case</code> as coverage, and never reports a name the block declares for itself. No Verible equivalent. Measured on opentitan: 3 findings before those exclusions, all false, 0 after; 3 on lucisv’s corpus, all real latches in <code dir="auto">common_cells/src/deprecated</code>.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="instance-shadowing">instance-shadowing</h2><a class="sl-anchor-link" href="#instance-shadowing"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “instance-shadowing”</span></a></div>
|
||||
<p>Reports a declaration that hides one from an enclosing scope of the same design unit — the block-local <code dir="auto">count</code> that quietly changes what every <code dir="auto">count</code> in the block means. Only data and instances are judged (a subroutine argument named after a signal is idiomatic), and only within one unit. Verible ships this off; lucisv turns it on.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="invalid-system-task-function">invalid-system-task-function</h2><a class="sl-anchor-link" href="#invalid-system-task-function"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “invalid-system-task-function”</span></a></div>
|
||||
<p>Reports <code dir="auto">$random</code>, <code dir="auto">$srandom</code>, the <code dir="auto">$dist_*</code> family and <code dir="auto">$psprintf</code>, and names the replacement. The random family all draw from one global generator, so a call added anywhere reshuffles every other stream and a failing seed stops reproducing; <code dir="auto">$psprintf</code> is a vendor spelling of <code dir="auto">$sformatf</code>. Verible’s <code dir="auto">invalid-system-task-function</code>, same list, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="mismatched-labels">mismatched-labels</h2><a class="sl-anchor-link" href="#mismatched-labels"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “mismatched-labels”</span></a></div>
|
||||
<p>Reports an end label that does not name the block it closes, and an <code dir="auto">end : name</code> on a block that has none — both compile errors (IEEE 1800 §9.3.4). Every construct that may carry a footer label is checked with one answer: module, interface, program, package, class, function, task, <code dir="auto">begin</code>, <code dir="auto">fork</code>/<code dir="auto">join</code>, generate block, clocking block, covergroup, property and sequence. Verible ships this off; lucisv turns it on and files it as an error.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="module-parameter">module-parameter</h2><a class="sl-anchor-link" href="#module-parameter"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “module-parameter”</span></a></div>
|
||||
<p>Reports more than one positional parameter override, which binds by order and silently changes what every instance elaborates to when a parameter is added or two are swapped. Verible’s <code dir="auto">module-parameter</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="module-port">module-port</h2><a class="sl-anchor-link" href="#module-port"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “module-port”</span></a></div>
|
||||
<p>Reports more than one positional port connection, for the same reason. A single-port instance has no order to get wrong and is left alone. Verible’s <code dir="auto">module-port</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="packed-dimensions-range-ordering">packed-dimensions-range-ordering</h2><a class="sl-anchor-link" href="#packed-dimensions-range-ordering"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “packed-dimensions-range-ordering”</span></a></div>
|
||||
<p>Reports a packed dimension that counts upwards (<code dir="auto">[0:7]</code>, <code dir="auto">[0:WIDTH-1]</code>), where bit 0 is the most significant one and every concatenation with an ordinary <code dir="auto">[7:0]</code> vector silently reverses. Unpacked arrays are not judged — an ascending array is normal — and two symbolic bounds lucisv cannot compare are left alone. Verible’s <code dir="auto">packed-dimensions-range-ordering</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="plusarg-assignment">plusarg-assignment</h2><a class="sl-anchor-link" href="#plusarg-assignment"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “plusarg-assignment”</span></a></div>
|
||||
<p>Reports <code dir="auto">$test$plusargs</code>, which matches by <em>prefix</em> — <code dir="auto">+foobar</code> makes <code dir="auto">$test$plusargs("foo")</code> true — and asks for <code dir="auto">$value$plusargs</code>, which matches the whole name and hands back the value. Verible’s <code dir="auto">plusarg-assignment</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="suspicious-semicolon">suspicious-semicolon</h2><a class="sl-anchor-link" href="#suspicious-semicolon"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “suspicious-semicolon”</span></a></div>
|
||||
<p>Reports <code dir="auto">if (x);</code>, <code dir="auto">for (…);</code>, <code dir="auto">while (…);</code> and their relatives, where the <code dir="auto">;</code> is the whole body and whatever is indented under it runs unconditionally. A deliberately empty body is <code dir="auto">begin end</code> and is not reported. Verible ships this off; lucisv turns it on, because the finding is a typo rather than a matter of taste.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="truncated-numeric-literal">truncated-numeric-literal</h2><a class="sl-anchor-link" href="#truncated-numeric-literal"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “truncated-numeric-literal”</span></a></div>
|
||||
<p>Reports a sized literal whose digits need more bits than it declares (<code dir="auto">4'hFFF</code>), which most simulators truncate silently. Leading zeros do not count, and a literal whose digits are all <code dir="auto">x</code>/<code dir="auto">z</code> (<code dir="auto">3'hz</code>) is left alone — those spell an unknown of that width. Verible’s <code dir="auto">truncated-numeric-literal</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="undeclared-identifier">undeclared-identifier</h2><a class="sl-anchor-link" href="#undeclared-identifier"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “undeclared-identifier”</span></a></div>
|
||||
<p>Reports a name this file does not declare, that no external unit it names could supply, and that <strong>no other file in the project writes down at all</strong>. Every clause is an exclusion, and they are what make an error-class rule about names safe: no project behind the run means no opinion, and so do a name any macro, directive or attribute in the file writes down, a file that did not fully parse, and an <code dir="auto"> `include</code>d fragment with no unit of its own. Measured on opentitan <code dir="auto">hw/</code> and on lucisv’s corpus: the same five findings, all real implicit nets in one ibex formal file. No Verible equivalent.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="undersized-binary-literal">undersized-binary-literal</h2><a class="sl-anchor-link" href="#undersized-binary-literal"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “undersized-binary-literal”</span></a></div>
|
||||
<p>Reports a sized binary literal that writes fewer digits than its width (<code dir="auto">8'b1</code>), and its safe fix writes the extension the language would have applied — <code dir="auto">0</code> for a literal starting with <code dir="auto">0</code> or <code dir="auto">1</code>, the unknown itself for one starting with <code dir="auto">x</code> or <code dir="auto">z</code>. A literal whose value is zero is exempt, matching Verible’s <code dir="auto">lint_zero</code> default. Verible’s <code dir="auto">undersized-binary-literal</code>, same bases, same defaults.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="unknown-parameter">unknown-parameter</h2><a class="sl-anchor-link" href="#unknown-parameter"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “unknown-parameter”</span></a></div>
|
||||
<p>Reports a <code dir="auto">#(.NAME(…))</code> override naming a parameter the instantiated module does not declare — including a <code dir="auto">localparam</code>, which is not overridable at all. It is silent whenever the project cannot answer: no project, an unindexed module, one declared twice with different headers, one whose header carries a compiler directive, a scope-qualified instantiation. Measured on opentitan: 4 findings, spot-checked true. No Verible equivalent.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="unknown-port">unknown-port</h2><a class="sl-anchor-link" href="#unknown-port"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “unknown-port”</span></a></div>
|
||||
<p>Reports a <code dir="auto">.name(…)</code> connection naming a port the instantiated module does not declare — the port rename that reached three of four instantiations. Same silences as <code dir="auto">unknown-parameter</code>; <code dir="auto">.*</code> names nothing and is not judged. Measured on opentitan: 40 findings, spot-checked true, all in pre-silicon testbenches out of step with their RTL. No Verible equivalent.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="void-cast">void-cast</h2><a class="sl-anchor-link" href="#void-cast"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “void-cast”</span></a></div>
|
||||
<p>Reports <code dir="auto">void'(…)</code> around something that is not a call, where there is no return value to discard — the missing call, or the cast left over from an edit. Verible’s <code dir="auto">void-cast</code> forbids a <em>named list</em> of calls instead, so the two do not overlap; the named-call form is wave 2’s business. Only a cast standing as a statement is judged.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="always-comb">always-comb</h2><a class="sl-anchor-link" href="#always-comb"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “always-comb”</span></a></div>
|
||||
<p>Reports <code dir="auto">always @*</code> and <code dir="auto">always @(*)</code>, which SystemVerilog spells <code dir="auto">always_comb</code>. The keyword is checked by the tool — a second driver of the block’s outputs becomes an error, and the inferred sensitivity list reaches into the functions the block calls. Verible enables its rule of the same name by default. The fix is offered but <strong>unsafe</strong>: <code dir="auto">always_comb</code> runs once at time zero and <code dir="auto">always @*</code> does not, so a testbench that samples before the first change can see a different value.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="banned-declared-name-patterns">banned-declared-name-patterns</h2><a class="sl-anchor-link" href="#banned-declared-name-patterns"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “banned-declared-name-patterns”</span></a></div>
|
||||
<p>Reports a declared name matching one of the patterns in the <code dir="auto">patterns</code> option, which is empty by default — the rule is a place for a project to point at its own list (a deprecated prefix, a vendor’s namespace, the <code dir="auto">tmp</code> a review keeps catching). Every declared name is judged: modules, packages, types, parameters, signals, ports, instances, labels. A pattern must match the whole name.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="constraint-name-style">constraint-name-style</h2><a class="sl-anchor-link" href="#constraint-name-style"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “constraint-name-style”</span></a></div>
|
||||
<p>Reports a <code dir="auto">constraint</code> whose name does not match <code dir="auto">([a-z0-9]+_)+c</code> (the <code dir="auto">pattern</code> option) — the shape Verible enables by default. A constraint’s name is what a test turns off with <code dir="auto">constraint_mode(0)</code>, so it is read far from its declaration.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="explicit-begin">explicit-begin</h2><a class="sl-anchor-link" href="#explicit-begin"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “explicit-begin”</span></a></div>
|
||||
<p>Reports a body that is a single statement rather than a <code dir="auto">begin ... end</code> block, for eleven constructs each with its own <code dir="auto">*_enable</code> option (<code dir="auto">if_enable</code>, <code dir="auto">else_enable</code>, <code dir="auto">always_ff_enable</code>, …), all on when the rule is. Off by default here as in Verible: the style is far from universal, and a codebase that did not start with it cannot adopt it one line at a time. An <code dir="auto">else if</code> chain is never reported. The safe fix wraps the body; run the formatter afterwards to lay it out.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="forbid-consecutive-null-statements">forbid-consecutive-null-statements</h2><a class="sl-anchor-link" href="#forbid-consecutive-null-statements"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “forbid-consecutive-null-statements”</span></a></div>
|
||||
<p>Reports a null statement whose preceding token is a <code dir="auto">;</code> — the <code dir="auto">;;</code> an edit leaves behind, and the statement twin of <code dir="auto">empty-item</code>. The empty header of <code dir="auto">for (;;)</code> is not a statement and is never reported. The safe fix deletes the extra <code dir="auto">;</code>.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="generate-label">generate-label</h2><a class="sl-anchor-link" href="#generate-label"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “generate-label”</span></a></div>
|
||||
<p>Reports a generate <code dir="auto">begin</code> with no <code dir="auto">: label</code>. An unlabelled block still gets a name (<code dir="auto">genblk3</code>), and that invented name is what appears in every hierarchical path — and it renumbers the moment a block is added above it. Silent in a file that does not fully parse: error recovery can rebind a procedural <code dir="auto">begin</code> as a generate one, which on opentitan accounted for 177 of 180 findings before the guard was added.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="generate-label-prefix">generate-label-prefix</h2><a class="sl-anchor-link" href="#generate-label-prefix"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “generate-label-prefix”</span></a></div>
|
||||
<p>Reports a generate label that starts with none of the <code dir="auto">prefix</code> option’s entries, <code dir="auto">g_</code> and <code dir="auto">gen_</code> by default. The prefix is what makes the generate levels of a hierarchical path visible. An empty list accepts every label while <code dir="auto">generate-label</code> still requires there to be one.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="interface-name-style">interface-name-style</h2><a class="sl-anchor-link" href="#interface-name-style"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “interface-name-style”</span></a></div>
|
||||
<p>Reports an <code dir="auto">interface</code> whose name does not match <code dir="auto">[a-z_0-9]+(_if)</code> (the <code dir="auto">style_regex</code> option) — Verible’s default pattern. Nothing in the syntax says an identifier is an interface rather than a module or a class; the suffix does.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="line-length">line-length</h2><a class="sl-anchor-link" href="#line-length"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “line-length”</span></a></div>
|
||||
<p>Reports a line wider than the limit — by default <strong>the width the formatter is configured with for that file</strong>, so the two halves of lucisv cannot disagree; the <code dir="auto">length</code> option overrides it. The check is token-aware, as Verible’s is: a line holding one unbreakable token (a long string, an <code dir="auto"> `include</code> path, a macro invocation) is left alone, because no wrapping could shorten it. There is no fix — where to break a line is what the formatter is for.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="macro-name-style">macro-name-style</h2><a class="sl-anchor-link" href="#macro-name-style"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “macro-name-style”</span></a></div>
|
||||
<p>Reports a <code dir="auto"> `define</code> whose name does not match <code dir="auto">[A-Z_0-9]+</code> (the <code dir="auto">style_regex</code> option). A macro obeys no scope and can rewrite the code around its use, which is why every language that has them marks them by case. Only the definition is judged, never the uses.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="one-module-per-file">one-module-per-file</h2><a class="sl-anchor-link" href="#one-module-per-file"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “one-module-per-file”</span></a></div>
|
||||
<p>Reports every <code dir="auto">module</code> after the first in a file. Off by default, as in Verible: plenty of real RTL keeps small helper modules beside the one the file is named for. An <code dir="auto">interface</code>, a <code dir="auto">program</code> and a <code dir="auto">package</code> are not modules. Silent in a file that does not fully parse, where recovery can promote a nested declaration to file scope.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="package-filename">package-filename</h2><a class="sl-anchor-link" href="#package-filename"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “package-filename”</span></a></div>
|
||||
<p>Reports a one-package file whose name matches neither the package (<code dir="auto">foo.sv</code>) nor the package with a <code dir="auto">_pkg</code> suffix (<code dir="auto">foo_pkg.sv</code>), the two spellings the industry writes. The <code dir="auto">allow-dash-for-underscore</code> option accepts <code dir="auto">foo-pkg.sv</code> as well. Silent for stdin and for a file that does not fully parse; renaming a file is not the linter’s business, so there is no fix.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="parameter-type-name-style">parameter-type-name-style</h2><a class="sl-anchor-link" href="#parameter-type-name-style"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “parameter-type-name-style”</span></a></div>
|
||||
<p>Reports a <code dir="auto">type</code> parameter whose name does not match <code dir="auto">[a-z][a-z_0-9]*_t</code> (the <code dir="auto">style_regex</code> option). A type parameter is a type, and naming it <code dir="auto">T</code> makes a declaration read like an expression. Off by default here as in Verible: <code dir="auto">#(type T = int)</code> is near-universal in UVM code.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="port-name-suffix">port-name-suffix</h2><a class="sl-anchor-link" href="#port-name-suffix"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “port-name-suffix”</span></a></div>
|
||||
<p>Reports a port whose name does not end in the suffix for its direction — <code dir="auto">_i</code>/<code dir="auto">_ni</code> for an input, <code dir="auto">_o</code>/<code dir="auto">_no</code> for an output, <code dir="auto">_io</code>/<code dir="auto">_nio</code> for an <code dir="auto">inout</code>, where the <code dir="auto">n</code> marks active-low. The <code dir="auto">suffixes</code> option is the accepted list; one of the six known suffixes is accepted only for its own direction, and anything else a project adds is accepted for any. Off by default: a codebase cannot adopt the convention one port at a time.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="posix-eof">posix-eof</h2><a class="sl-anchor-link" href="#posix-eof"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “posix-eof”</span></a></div>
|
||||
<p>Reports a file whose last line has no newline — formally, a file with no last line: <code dir="auto">wc -l</code> counts short, and the next edit’s diff shows the final line twice. The safe fix appends the newline. An empty file is left alone.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="signal-name-style">signal-name-style</h2><a class="sl-anchor-link" href="#signal-name-style"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “signal-name-style”</span></a></div>
|
||||
<p>Reports a net, variable or port inside a module, interface or program whose name does not match <code dir="auto">[a-z_0-9]+</code> (the <code dir="auto">style_regex</code> option). Off by default here as in Verible: switching it on for an existing codebase reports thousands of findings on the first run, which is a project’s decision. Class properties, <code dir="auto">parameter</code>s and subroutine locals are other rules’ business, or nobody’s.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="typedef-enums">typedef-enums</h2><a class="sl-anchor-link" href="#typedef-enums"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “typedef-enums”</span></a></div>
|
||||
<p>Reports a declaration whose type is an anonymous <code dir="auto">enum</code>. The language gives no way to name such a type afterwards: a function cannot take it, a port cannot carry it, and two variables declared with the same member list are different types to the compiler.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="typedef-structs-unions">typedef-structs-unions</h2><a class="sl-anchor-link" href="#typedef-structs-unions"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “typedef-structs-unions”</span></a></div>
|
||||
<p>Reports a declaration whose type is an anonymous <code dir="auto">struct</code> or <code dir="auto">union</code>, for the reasons <code dir="auto">typedef-enums</code> gives. The <code dir="auto">allow_anonymous_nested</code> option (true by default here — Verible defaults it to false) exempts an aggregate written inside another aggregate’s body — which is what auto-generated register packages are made of: on opentitan <code dir="auto">hw/</code>, all 3 159 findings are nested structs inside a <code dir="auto">typedef</code> in 57 <code dir="auto">reggen</code>-generated files, and opentitan’s own Verible config disables the rule with the comment “we allow nested struct definitions”. One option, or one <code dir="auto">ignore</code>, expresses the same choice here.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="create-object-name-match">create-object-name-match</h2><a class="sl-anchor-link" href="#create-object-name-match"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “create-object-name-match”</span></a></div>
|
||||
<p>Reports a <code dir="auto"><type>::type_id::create("name", …)</code> whose string does not match the handle it is assigned to. That string is the object’s UVM instance name, so every <code dir="auto">uvm_config_db</code> path, factory override and <code dir="auto">+uvm_set_config</code> plusarg written against the handle silently misses the object — and nothing fails, it just does not take. Only a plain variable target and a string-literal first argument are judged. Verible’s <code dir="auto">create-object-name-match</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="dff-name-style">dff-name-style</h2><a class="sl-anchor-link" href="#dff-name-style"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “dff-name-style”</span></a></div>
|
||||
<p>Reports a nonblocking assignment in an <code dir="auto">always_ff</code> whose target does not end in a registered-output suffix (<code dir="auto">_q</code>, <code dir="auto">_r</code>, <code dir="auto">_ff</code>, <code dir="auto">_reg</code>), one whose <code dir="auto">_d</code>/<code dir="auto">_n</code>/<code dir="auto">_next</code> source does not share its base, and a name ending in one of those suffixes that is driven combinationally instead. Verible’s <code dir="auto">dff-name-style</code>, same default (off) and the same four options — <code dir="auto">input</code>, <code dir="auto">output</code>, <code dir="auto">waive_ifs_with_conditions</code> and <code dir="auto">waive_lhs_regex</code>, whose default is Verible’s <code dir="auto">(?i)mem.*</code> rewritten as <code dir="auto">[mM][eE][mM].*</code> because lucisv’s pattern engine has no inline flags.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="disable-statement">disable-statement</h2><a class="sl-anchor-link" href="#disable-statement"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “disable-statement”</span></a></div>
|
||||
<p>Reports <code dir="auto">disable <label></code> where the label is not a sequential block’s. Naming a <code dir="auto">fork</code> block reads as though it kills the forked processes and does something else entirely; <code dir="auto">disable fork</code> is the spelling that works. Wider than Verible: a task or function declared in the same file is also a legal target here, because <code dir="auto">disable task_name</code> is ordinary and reporting it would be a false positive. Verible’s <code dir="auto">disable-statement</code>, same default (off).</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="endif-comment">endif-comment</h2><a class="sl-anchor-link" href="#endif-comment"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “endif-comment”</span></a></div>
|
||||
<p>Reports an <code dir="auto">`endif</code> with no comment beside it naming the condition it closes, and offers a <strong>safe fix</strong> that appends <code dir="auto">// <name></code>. A bare <code dir="auto">`endif</code> two hundred lines below its <code dir="auto">`ifdef</code> says nothing about which condition just ended. A comment that names something else is reported without a fix — rewriting somebody’s words is not a repair. Verible’s <code dir="auto">endif-comment</code>, same default (off).</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="explicit-function-lifetime">explicit-function-lifetime</h2><a class="sl-anchor-link" href="#explicit-function-lifetime"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “explicit-function-lifetime”</span></a></div>
|
||||
<p>Reports a function declared outside a class with no <code dir="auto">automatic</code> or <code dir="auto">static</code>. Such a function is <code dir="auto">static</code>, its locals are shared by every call, and nothing in the source says the author knew. A prototype declares no locals and is exempt; so is an <strong>out-of-body definition</strong> (<code dir="auto">function cls::f(…)</code>), which is wider than Verible — lexically it sits outside the class, but it <em>is</em> a class method, and on opentitan <code dir="auto">hw/</code> that one exemption removed 948 of 960 findings. Verible’s <code dir="auto">explicit-function-lifetime</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="explicit-task-lifetime">explicit-task-lifetime</h2><a class="sl-anchor-link" href="#explicit-task-lifetime"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “explicit-task-lifetime”</span></a></div>
|
||||
<p>The same rule for tasks, and the case is stronger: a task can block, so a <code dir="auto">static</code> one is routinely called from two processes at once with one set of locals between them. Verible’s <code dir="auto">explicit-task-lifetime</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="forbid-line-continuations">forbid-line-continuations</h2><a class="sl-anchor-link" href="#forbid-line-continuations"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “forbid-line-continuations”</span></a></div>
|
||||
<p>Reports a string literal broken across lines with a trailing <code dir="auto">\</code>. Such a string keeps every character of the next line, its indentation included, so re-indenting the file changes the string’s value. A multi-line <code dir="auto">`define</code> is not judged — that is the only spelling the language gives. Verible’s <code dir="auto">forbid-line-continuations</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="forbidden-macro">forbidden-macro</h2><a class="sl-anchor-link" href="#forbidden-macro"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “forbidden-macro”</span></a></div>
|
||||
<p>Reports an invocation of a macro on the <code dir="auto">macros</code> list, which defaults to Verible’s own single entry, <code dir="auto">`uvm_warning</code> — a message nothing acts on, where the choice belongs at the point of failure (<code dir="auto">`uvm_error</code> or <code dir="auto">`uvm_info</code>). Verible hard-codes its list; here it is an option, so a project bans its own names instead of asking for a rule. Verible’s <code dir="auto">forbidden-macro</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="legacy-generate-region">legacy-generate-region</h2><a class="sl-anchor-link" href="#legacy-generate-region"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “legacy-generate-region”</span></a></div>
|
||||
<p>Reports a <code dir="auto">generate … endgenerate</code> region, which SystemVerilog does not need: an <code dir="auto">if</code>, <code dir="auto">for</code> or <code dir="auto">case</code> generate is a module item like any other. Off by default in both, because a codebase that must still compile as Verilog-2001 needs the wrapper. Verible’s <code dir="auto">legacy-generate-region</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="legacy-genvar-declaration">legacy-genvar-declaration</h2><a class="sl-anchor-link" href="#legacy-genvar-declaration"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “legacy-genvar-declaration”</span></a></div>
|
||||
<p>Reports a <code dir="auto">genvar</code> declared outside a <code dir="auto">for</code> header, where it outlives the loop that used it and two loops appear to share a variable. Off by default in both, for the same Verilog-2001 reason. Verible’s <code dir="auto">legacy-genvar-declaration</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="macro-string-concatenation">macro-string-concatenation</h2><a class="sl-anchor-link" href="#macro-string-concatenation"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “macro-string-concatenation”</span></a></div>
|
||||
<p>Reports the <code dir="auto"> </code> <code dir="auto">token-concatenation operator written inside a *plain* string literal in a</code> <code dir="auto">define `` body, where the preprocessor does not expand it and the two backticks reach the output. The `` </code>“…<code dir="auto">" `` spelling — which the rule skips — is the one that works. Verible's </code>macro-string-concatenation`, same default (off).</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="module-begin-block">module-begin-block</h2><a class="sl-anchor-link" href="#module-begin-block"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “module-begin-block”</span></a></div>
|
||||
<p>Reports a <code dir="auto">begin … end</code> written straight into a module body, where a module item belongs. Tools that accept it treat it as an unnamed generate block, so the declarations inside land in an invented scope and every hierarchical path written against them is wrong. lucisv’s parser <em>recovers</em> the construct in error-tolerant mode — it reads the block as that unnamed generate block and records a diagnostic at the <code dir="auto">begin</code>, so the file is still reported as not parsing cleanly and is still never formatted, while the items inside the block and after it stay visible to every rule. Verible’s <code dir="auto">module-begin-block</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="numeric-format-string-style">numeric-format-string-style</h2><a class="sl-anchor-link" href="#numeric-format-string-style"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “numeric-format-string-style”</span></a></div>
|
||||
<p>Reports a <code dir="auto">0x</code>/<code dir="auto">'b</code>-style radix prefix immediately before a <code dir="auto">%</code> specifier that prints a different base (<code dir="auto">"0x%0b"</code>), and any such prefix before a decimal one (<code dir="auto">"0d%0d"</code>). A specifier with no prefix is always accepted. A log line that prints <code dir="auto">addr = 0x1010</code> for a binary value costs the reader an hour. Verible’s <code dir="auto">numeric-format-string-style</code>, same default (off).</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="positive-meaning-parameter-name">positive-meaning-parameter-name</h2><a class="sl-anchor-link" href="#positive-meaning-parameter-name"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “positive-meaning-parameter-name”</span></a></div>
|
||||
<p>Reports a parameter whose name starts with <code dir="auto">disable</code>, in any case. <code dir="auto">if (!DisableEcc)</code> is a double negative and <code dir="auto">DisableEcc = 0</code> means “ECC is on”, which nobody reads correctly at speed. Verible’s <code dir="auto">positive-meaning-parameter-name</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="proper-parameter-declaration">proper-parameter-declaration</h2><a class="sl-anchor-link" href="#proper-parameter-declaration"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “proper-parameter-declaration”</span></a></div>
|
||||
<p>Reports a <code dir="auto">parameter</code> written in a module, class or package <em>body</em> rather than in a formal parameter list, and a <code dir="auto">localparam</code> written where the project’s options do not allow it. A body <code dir="auto">parameter</code> is still overridable from outside with nothing at the declaration to say so. A formal parameter list is never judged. Verible’s <code dir="auto">proper-parameter-declaration</code>, same default (off) and the same two options, <code dir="auto">package_allow_parameter</code> (false) and <code dir="auto">package_allow_localparam</code> (true).</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="suggest-parentheses">suggest-parentheses</h2><a class="sl-anchor-link" href="#suggest-parentheses"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “suggest-parentheses”</span></a></div>
|
||||
<p>Reports a conditional expression standing unparenthesized in the true-clause of another (<code dir="auto">a ? b ? c : d : e</code>) and offers a <strong>safe fix</strong> that adds the two characters. The language already reads it that way; the reader has to count colons to find out. A conditional in the false-clause is where the language puts it and is not reported. Verible’s <code dir="auto">suggest-parentheses</code>, same shape and same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="unpacked-dimensions-range-ordering">unpacked-dimensions-range-ordering</h2><a class="sl-anchor-link" href="#unpacked-dimensions-range-ordering"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “unpacked-dimensions-range-ordering”</span></a></div>
|
||||
<p>Reports an unpacked dimension that counts downwards (<code dir="auto">[7:0]</code>, <code dir="auto">[DEPTH-1:0]</code>), where element 0 is the last one and every <code dir="auto">for (i = 0; …)</code> beside it reads the array backwards. The mirror image of <code dir="auto">packed-dimensions-range-ordering</code>, which wants a vector’s width the other way. A sized, dynamic or associative extent is not a range and is left alone; two symbolic bounds lucisv cannot compare are too. Verible’s <code dir="auto">unpacked-dimensions-range-ordering</code>, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="uvm-macro-semicolon">uvm-macro-semicolon</h2><a class="sl-anchor-link" href="#uvm-macro-semicolon"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “uvm-macro-semicolon”</span></a></div>
|
||||
<p>Reports a <code dir="auto">;</code> written after a <code dir="auto">`uvm_*</code> macro invocation. The macros expand to a <code dir="auto">begin … end</code>, so the <code dir="auto">;</code> is a null statement — usually inert, and not after <code dir="auto">if (x) </code>uvm_info(…); else …<code dir="auto">, where the </code>else<code dir="auto">then belongs to nothing. Off by default in both, because the semicolon is written everywhere in existing UVM code. No fix: deleting it is exactly the edit that is unsafe in the shape the rule exists for. Verible's</code>uvm-macro-semicolon`, same default.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="v2001-generate-begin">v2001-generate-begin</h2><a class="sl-anchor-link" href="#v2001-generate-begin"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “v2001-generate-begin”</span></a></div>
|
||||
<p>Reports a bare <code dir="auto">begin … end</code> written directly inside a <code dir="auto">generate … endgenerate</code> with no <code dir="auto">if</code>, <code dir="auto">for</code> or <code dir="auto">case</code> around it. It opens an unnamed generate block — an invented path segment that renumbers when a block is added above it — and buys nothing, because the region is already a scope. Read from the same recovered block <code dir="auto">module-begin-block</code> reads, one scope in. Verible’s <code dir="auto">v2001-generate-begin</code>, same default.</p>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/reference/rules.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-04T22:08:53.000Z">Sep 4, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/reference/cli/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">CLI</span></span></a><a href="/reference/language-tools/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Language tools</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
+58
-15
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Rust API index | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/rust-api/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Rust API index"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/rust-api/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Index of every public function and method in lucisv’s reusable Rust library crates."/><meta name="description" content="Index of every public function and method in lucisv’s reusable Rust library crates."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Rust API index | lucisv</title><link rel="canonical" href="https://lucisv.dev/reference/rust-api/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Rust API index"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/reference/rust-api/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Navigational index of the main public APIs in lucisv’s reusable Rust library crates."/><meta name="description" content="Navigational index of the main public APIs in lucisv’s reusable Rust library crates."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -70,8 +70,15 @@
|
||||
})();
|
||||
</script></sl-sidebar-state-persist><div class="md:sl-hidden"><div class="mobile-preferences sl-flex astro-b5gddk54"><div class="social-icons astro-b5gddk54"><a href="https://git.luci.ooo/lucio/verilogrustformatter" rel="me" class="sl-flex astro-cg55etiy"><span class="sr-only astro-cg55etiy">Source repository</span><svg aria-hidden="true" class="astro-cg55etiy astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a></div><starlight-theme-select><label style="--sl-select-width: 6.25em" class="astro-r2p65idu"><span class="sr-only astro-r2p65idu">Select theme</span><svg aria-hidden="true" class="icon label-icon astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg><select autocomplete="off" class="astro-r2p65idu"><option value="dark" class="astro-r2p65idu">Dark</option><option value="light" class="astro-r2p65idu">Light</option><option value="auto" selected class="astro-r2p65idu">Auto</option></select><svg aria-hidden="true" class="icon caret astro-r2p65idu astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg></label></starlight-theme-select><script>
|
||||
StarlightThemeProvider.updatePickers();
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_parser" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_parser</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#entry-points-and-lexical-utilities" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Entry points and lexical utilities</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#coordinates-and-token-queries" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Coordinates and token queries</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#ast-queries" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">AST queries</span></a></li></ul></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_formatter" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_formatter</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#formatting-and-verification" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Formatting and verification</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#document-model-and-printer" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Document model and printer</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#alignment-fences-and-ranges" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Alignment, fences, and ranges</span></a></li></ul></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_linter" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_linter</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#run-and-select-rules" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Run and select rules</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#context-diagnostics-and-fixes" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Context, diagnostics, and fixes</span></a></li></ul></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_semantic" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_semantic</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#file-semantics" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">File semantics</spanLine truncated
|
||||
<p>This is a navigational API index, not source documentation. It lists the public callable surface of the six reusable library crates in the workspace; command-line and language-server binaries are documented in their dedicated references.</p>
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_parser" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_parser</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#entry-points-and-lexical-utilities" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Entry points and lexical utilities</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#coordinates-and-token-queries" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Coordinates and token queries</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#ast-queries" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">AST queries</span></a></li></ul></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_formatter" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_formatter</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#formatting-and-verification" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Formatting and verification</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#document-model-and-printer" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Document model and printer</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#alignment-fences-and-ranges" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Alignment, fences, and ranges</span></a></li></ul></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_linter" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_linter</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#run-and-select-rules" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Run and select rules</span></a></li><li style="--depth: 1;" class="astro-cxyftcne"><a href="#context-diagnostics-and-fixes" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">Context, diagnostics, and fixes</span></a></li></ul></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#vlog_semantic" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">vlog_semantic</span></a><ul class="isMobile astro-cxyftcne" style="--depth: 1;"><li style="--depth: 1;" class="astro-cxyftcne"><a href="#file-semantics" style="--depth: 1;" class="astro-cxyftcne"><span style="--depth: 1;" class="astro-cxyftcne">File semantics</spanLine truncated
|
||||
<p>This is a navigational API index, not source documentation. It summarizes the main public callable surface of the six reusable library crates in the workspace; command-line and language-server binaries are documented in their dedicated references.</p>
|
||||
<p>The workspace baseline is v0.41.0. For the complete signatures and fields,
|
||||
run <code dir="auto">cargo doc --workspace --no-deps</code>; this hand-maintained index is not an
|
||||
exhaustive replacement for rustdoc. The parser’s strict and tolerant entry
|
||||
points share one grammar; tolerant errors do not imply formatter acceptance.
|
||||
Any thread calling parsing, analysis, or formatting on deeply nested input
|
||||
must provide at least <code dir="auto">vlog_parser::PARSE_STACK_SIZE</code> (16 MiB) of stack.
|
||||
The CLI and server configure their worker threads accordingly.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="vlog_parser"><code dir="auto">vlog_parser</code></h2><a class="sl-anchor-link" href="#vlog_parser"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “vlog_parser”</span></a></div>
|
||||
<div class="sl-heading-wrapper level-h3"><h3 id="entry-points-and-lexical-utilities">Entry points and lexical utilities</h3><a class="sl-anchor-link" href="#entry-points-and-lexical-utilities"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Entry points and lexical utilities”</span></a></div>
|
||||
<table>
|
||||
@@ -218,7 +225,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">verify_equivalence</code></td>
|
||||
<td>Confirm normalized syntax is unchanged</td>
|
||||
<td>Re-lex and compare normalized tokens, including comments</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">verify_convergence</code></td>
|
||||
@@ -324,7 +331,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">select_rules</code></td>
|
||||
<td>Apply select/ignore names to the registry</td>
|
||||
<td>Apply select/ignore rule names or severity classes to the registry</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">rules_named</code></td>
|
||||
<td>Expand a rule name or severity class to registered rules</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">module_interfaces</code></td>
|
||||
<td>Build the module interface facts used by lint oracles</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">rules_markdown</code></td>
|
||||
@@ -343,15 +358,15 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code dir="auto">ParsedSource</code></td>
|
||||
<td><code dir="auto">parse</code>, <code dir="auto">lex_error</code>, <code dir="auto">tokens</code>, <code dir="auto">context</code></td>
|
||||
<td><code dir="auto">parse</code>, <code dir="auto">lex_error</code>, <code dir="auto">tokens</code>, <code dir="auto">file</code>, <code dir="auto">context</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">LintContext</code></td>
|
||||
<td><code dir="auto">new</code>, <code dir="auto">from_parse</code>, <code dir="auto">with_tab_width</code>, <code dir="auto">with_semantics</code>, <code dir="auto">with_oracle</code>, <code dir="auto">mentioned_elsewhere</code>, <code dir="auto">has_oracle</code>, <code dir="auto">semantics</code>, <code dir="auto">source</code>, <code dir="auto">tokens</code>, <code dir="auto">file</code>, <code dir="auto">line_index</code>, <code dir="auto">path</code>, <code dir="auto">tab_width</code>, <code dir="auto">line_text</code>, <code dir="auto">touches_string</code>, <code dir="auto">comments</code></td>
|
||||
<td><code dir="auto">new</code>, <code dir="auto">from_parse</code>, <code dir="auto">with_tab_width</code>, <code dir="auto">with_line_length</code>, <code dir="auto">with_options</code>, <code dir="auto">with_semantics</code>, <code dir="auto">with_oracle</code>, <code dir="auto">mentioned_elsewhere</code>, <code dir="auto">has_oracle</code>, <code dir="auto">module_interface</code>, <code dir="auto">parsed_cleanly</code>, <code dir="auto">line_length</code>, <code dir="auto">options</code>, <code dir="auto">option_bool</code>, <code dir="auto">option_int</code>, <code dir="auto">option_str</code>, <code dir="auto">option_list</code>, <code dir="auto">option_is_set</code>, <code dir="auto">semantics</code>, <code dir="auto">source</code>, <code dir="auto">tokens</code>, <code dir="auto">file</code>, <code dir="auto">line_index</code>, <code dir="auto">path</code>, <code dir="auto">tab_width</code>, <code dir="auto">line_text</code>, <code dir="auto">touches_string</code>, <code dir="auto">comments</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">MentionOracle</code></td>
|
||||
<td>Implement <code dir="auto">mentioned_outside</code> to supply a project-wide identifier census</td>
|
||||
<td>Supply <code dir="auto">mentioned_outside</code> and optional <code dir="auto">module_interface</code> for project-aware checks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">Violation</code></td>
|
||||
@@ -367,7 +382,23 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>module function</td>
|
||||
<td><code dir="auto">apply_fixes</code></td>
|
||||
<td><code dir="auto">apply_fixes</code> (caller must filter format-fenced edits)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">Severity</code></td>
|
||||
<td><code dir="auto">as_str</code>, <code dir="auto">from_name</code>, <code dir="auto">describes</code>; classes <code dir="auto">Error</code>, <code dir="auto">Warning</code>, <code dir="auto">Style</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">RuleOptions</code></td>
|
||||
<td><code dir="auto">new</code>, <code dir="auto">is_empty</code>, <code dir="auto">set_raw</code>, <code dir="auto">set</code>, <code dir="auto">overlay</code>, <code dir="auto">is_set</code>, <code dir="auto">bool</code>, <code dir="auto">int</code>, <code dir="auto">str</code>, <code dir="auto">list</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">OptionKind</code> / <code dir="auto">OptionDefault</code></td>
|
||||
<td><code dir="auto">as_str</code>, <code dir="auto">vocabulary</code> / <code dir="auto">value</code>, <code dir="auto">as_written</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>editor settings functions</td>
|
||||
<td><code dir="auto">vscode_lint_settings</code>, <code dir="auto">rule_setting</code>, <code dir="auto">severity_setting</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -387,7 +418,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">Semantics</code></td>
|
||||
<td><code dir="auto">scopes</code>, <code dir="auto">symbols</code>, <code dir="auto">symbols_named</code>, <code dir="auto">references</code>, <code dir="auto">file_scope</code>, <code dir="auto">scope</code>, <code dir="auto">symbol</code>, <code dir="auto">symbol_at</code>, <code dir="auto">reference_at</code>, <code dir="auto">reference_id_at</code>, <code dir="auto">reference</code>, <code dir="auto">definition_of</code>, <code dir="auto">references_of</code>, <code dir="auto">document_symbols</code>, <code dir="auto">resolution_counts</code>, <code dir="auto">member_site</code>, <code dir="auto">unit_site</code>, <code dir="auto">instantiable_scope</code>, <code dir="auto">member_scopes</code>, <code dir="auto">file_span</code></td>
|
||||
<td><code dir="auto">scopes</code>, <code dir="auto">symbols</code>, <code dir="auto">symbols_named</code>, <code dir="auto">duplicates</code>, <code dir="auto">references</code>, <code dir="auto">file_scope</code>, <code dir="auto">scope</code>, <code dir="auto">symbol</code>, <code dir="auto">symbol_at</code>, <code dir="auto">reference_at</code>, <code dir="auto">reference_id_at</code>, <code dir="auto">reference</code>, <code dir="auto">definition_of</code>, <code dir="auto">references_of</code>, <code dir="auto">document_symbols</code>, <code dir="auto">resolution_counts</code>, <code dir="auto">member_site</code>, <code dir="auto">unit_site</code>, <code dir="auto">instantiable_scope</code>, <code dir="auto">member_scopes</code>, <code dir="auto">file_span</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">Reference</code></td>
|
||||
@@ -414,7 +445,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code dir="auto">WorkspaceIndex</code></td>
|
||||
<td><code dir="auto">build</code>, <code dir="auto">files</code>, <code dir="auto">path</code>, <code dir="auto">file_id</code>, <code dir="auto">units</code>, <code dir="auto">member</code>, <code dir="auto">members_of</code>, <code dir="auto">members_of_chain</code>, <code dir="auto">member_unit</code>, <code dir="auto">instantiations_of</code>, <code dir="auto">subclasses_of</code>, <code dir="auto">base_of</code>, <code dir="auto">instantiations</code>, <code dir="auto">subclasses</code>, <code dir="auto">facts_for</code>, <code dir="auto">defines</code>, <code dir="auto">find_define</code>, <code dir="auto">references_to</code>, <code dir="auto">references_are_ambiguous</code>, <code dir="auto">files_spelling</code>, <code dir="auto">files_mentioning</code>, <code dir="auto">mentioned_outside</code>, <code dir="auto">workspace_symbols</code>, <code dir="auto">units_of</code>, <code dir="auto">instantiable_units</code>, <code dir="auto">counts</code>, <code dir="auto">update_file</code>, <code dir="auto">update_facts</code>, <code dir="auto">absorb</code>, <code dir="auto">remove_file</code>, <code dir="auto">fingerprint</code></td>
|
||||
<td><code dir="auto">build</code>, <code dir="auto">files</code>, <code dir="auto">path</code>, <code dir="auto">file_id</code>, <code dir="auto">units</code>, <code dir="auto">member</code>, <code dir="auto">members_of</code>, <code dir="auto">members_of_chain</code>, <code dir="auto">member_unit</code>, <code dir="auto">instantiations_of</code>, <code dir="auto">subclasses_of</code>, <code dir="auto">base_of</code>, <code dir="auto">instantiations</code>, <code dir="auto">subclasses</code>, <code dir="auto">facts_for</code>, <code dir="auto">defines</code>, <code dir="auto">find_define</code>, <code dir="auto">references_to</code>, <code dir="auto">references_are_ambiguous</code>, <code dir="auto">files_spelling</code>, <code dir="auto">files_mentioning</code>, <code dir="auto">files_naming_in_macros</code>, <code dir="auto">mentioned_outside</code>, <code dir="auto">workspace_symbols</code>, <code dir="auto">units_of</code>, <code dir="auto">instantiable_units</code>, <code dir="auto">counts</code>, <code dir="auto">update_file</code>, <code dir="auto">update_facts</code>, <code dir="auto">absorb</code>, <code dir="auto">remove_file</code>, <code dir="auto">fingerprint</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">IndexBuilder</code></td>
|
||||
@@ -422,7 +453,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">FileFacts</code></td>
|
||||
<td><code dir="auto">of</code>, <code dir="auto">from_analysis</code>, <code dir="auto">words</code>, <code dir="auto">path</code>, <code dir="auto">encode</code>, <code dir="auto">decode</code></td>
|
||||
<td><code dir="auto">of</code>, <code dir="auto">from_analysis</code>, <code dir="auto">words</code>, <code dir="auto">macro_words</code>, <code dir="auto">path</code>, <code dir="auto">encode</code>, <code dir="auto">decode</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">DefinitionKey</code></td>
|
||||
@@ -445,11 +476,15 @@
|
||||
<td>Sort workspace inputs into their deterministic index order</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">words::harvest</code> / <code dir="auto">harvest_text</code></td>
|
||||
<td><code dir="auto">words::harvest</code> / <code dir="auto">harvest_text</code> / <code dir="auto">harvest_raw</code></td>
|
||||
<td>Build the shared identifier census from tokens or source text</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><code dir="auto">FACTS_FORMAT</code> is <strong>17</strong>. Cached facts include normal and macro identifier
|
||||
censuses; <code dir="auto">Def::lines.positions</code> can carry <code dir="auto">DeclPositions</code> with UTF-16 ranges
|
||||
for file-scope declarations. Any persisted shape or fact-census change needs
|
||||
a codec-version decision so stale caches cannot silently omit answers.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="vlog_refactor"><code dir="auto">vlog_refactor</code></h2><a class="sl-anchor-link" href="#vlog_refactor"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “vlog_refactor”</span></a></div>
|
||||
<div class="sl-heading-wrapper level-h3"><h3 id="rename-and-references">Rename and references</h3><a class="sl-anchor-link" href="#rename-and-references"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Rename and references”</span></a></div>
|
||||
<table>
|
||||
@@ -528,6 +563,10 @@
|
||||
<td>Search indexed module names</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">sites_phrase</code></td>
|
||||
<td>Share the port-action site-count wording with server offers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">instantiation_plan</code></td>
|
||||
<td>Build an instantiation plan from an indexed module</td>
|
||||
</tr>
|
||||
@@ -577,7 +616,7 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="sl-heading-wrapper level-h3"><h3 id="cache">Cache</h3><a class="sl-anchor-link" href="#cache"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Cache”</span></a></div>
|
||||
<div class="sl-heading-wrapper level-h3"><h3 id="atomic-writes-and-cache">Atomic writes and cache</h3><a class="sl-anchor-link" href="#atomic-writes-and-cache"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Atomic writes and cache”</span></a></div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -587,6 +626,10 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code dir="auto">atomic::write_atomic</code></td>
|
||||
<td>Replace file contents through a sibling temp file and rename; callers must coordinate concurrent writes to one target</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">content_hash</code></td>
|
||||
<td>Compute the cache’s FNV-1a content fingerprint</td>
|
||||
</tr>
|
||||
@@ -597,4 +640,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<aside aria-label="Types" class="starlight-aside starlight-aside--note"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path d="M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1Zm.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.15 1.15 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21ZM12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20Z"/></svg>Types</p><div class="starlight-aside__content"><p>The crates also expose their data models—AST nodes, diagnostics, rule traits, workspace identifiers, edits, plans, and formatter document nodes. This page intentionally indexes callable behavior; generated Rust API docs remain the right place for field-level type details.</p></div></aside>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/reference/rust-api.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-08-27T03:31:44.000Z">Aug 27, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/reference/language-tools/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Language tools</span></span></a><a href="/reference/architecture/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Architecture</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/reference/rust-api.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-03T09:28:11.000Z">Sep 3, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/reference/language-tools/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Language tools</span></span></a><a href="/reference/architecture/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Architecture</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
+41
-10
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Configuration | lucisv</title><link rel="canonical" href="https://lucisv.dev/start/configuration/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Configuration"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/start/configuration/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Configure formatting, exclusions, filelists, caching, and editor behavior for lucisv."/><meta name="description" content="Configure formatting, exclusions, filelists, caching, and editor behavior for lucisv."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Configuration | lucisv</title><link rel="canonical" href="https://lucisv.dev/start/configuration/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Configuration"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/start/configuration/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Configure formatting, exclusions, filelists, caching, and editor behavior for lucisv."/><meta name="description" content="Configure formatting, exclusions, filelists, caching, and editor behavior for lucisv."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
@@ -72,7 +72,9 @@
|
||||
StarlightThemeProvider.updatePickers();
|
||||
</script></div></div></div></div></nav><div class="main-frame astro-gqpr5s5a"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="lg:sl-flex astro-abfeecmu"><aside class="right-sidebar-container print:hidden astro-abfeecmu"><div class="right-sidebar astro-abfeecmu"><div class="lg:sl-hidden astro-q5mffni3"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-5ulgm6bh"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-5ulgm6bh"><details id="starlight__mobile-toc" class="astro-5ulgm6bh"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-5ulgm6bh"><span class="toggle sl-flex astro-5ulgm6bh">On this page<svg aria-hidden="true" class="caret astro-5ulgm6bh astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-5ulgm6bh"></span></summary><div class="dropdown astro-5ulgm6bh"><ul class="isMobile astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#keys" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Keys</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#discovery" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Discovery</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#strict-parsing" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Strict parsing</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#editor-settings" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Editor settings</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#cache" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Cache</span></a></li></ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.BcSo_yiZ.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-q5mffni3"><div class="sl-container astro-q5mffni3"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-cxyftcne" style="--depth: 0;"><li style="--depth: 0;" class="astro-cxyftcne"><a href="#_top" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Overview</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#keys" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Keys</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#discovery" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Discovery</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#strict-parsing" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Strict parsing</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#editor-settings" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Editor settings</span></a></li><li style="--depth: 0;" class="astro-cxyftcne"><a href="#cache" style="--depth: 0;" class="astro-cxyftcne"><span style="--depth: 0;" class="astro-cxyftcne">Cache</span></a></li></ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.Csloo1VZ.js"></script></div></div></div></aside><div class="main-pane astro-abfeecmu"><main data-pagefind-body class="astro-vdxcvpsm" lang="en" dir="ltr"><div class="content-panel astro-oil7k7jf"><div class="sl-container astro-oil7k7jf"><h1 id="_top" class="astro-2sm4b3ln">Configuration</h1></div></div><diLine truncated
|
||||
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.w36nc.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame has-title not-content"><figcaption class="header"><span class="title">lucisv.toml</span></figcaption><pre data-language="toml"><code><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">line-length</span><span style="--0:#D6DEEB;--1:#403F53"> = </span><span style="--0:#F78C6C;--1:#AA0982">100</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">indent</span><span style="--0:#D6DEEB;--1:#403F53"> = </span><span style="--0:#F78C6C;--1:#AA0982">2</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">exclude</span><span style="--0:#D6DEEB;--1:#403F53"> = [</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">*_gen.sv</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">, </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">build</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">filelist</span><span style="--0:#D6DEEB;--1:#403F53"> = </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">rtl/files.f</span><span style="--0:#D9F5DD;--1:#111111">"</span></div></div><div class="ec-line"><div class="code">
|
||||
</div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">[lint]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">select</span><span style="--0:#D6DEEB;--1:#403F53"> = [</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">no-tabs</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">, </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">unused-signal</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">ignore</span><span style="--0:#D6DEEB;--1:#403F53"> = [</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">module-filename</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">]</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="line-length = 100indent = 2exclude = ["*_gen.sv", "build"]filelist = "rtl/files.f"[lint]select = ["no-tabs", "unused-signal"]ignore = ["module-filename"]"><div></div></button></div></figure></div>
|
||||
</div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">[lint]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">select</span><span style="--0:#D6DEEB;--1:#403F53"> = [</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">no-tabs</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">, </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">unused-signal</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">ignore</span><span style="--0:#D6DEEB;--1:#403F53"> = [</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">module-filename</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">]</span></div></div><div class="ec-line"><div class="code">
|
||||
</div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">[lint.line-length]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">length</span><span style="--0:#D6DEEB;--1:#403F53"> = </span><span style="--0:#F78C6C;--1:#AA0982">120</span></div></div><div class="ec-line"><div class="code">
|
||||
</div></div><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">[lint.signal-name-style]</span></div></div><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3B61B0">style_regex</span><span style="--0:#D6DEEB;--1:#403F53"> = </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">[a-z_0-9]+</span><span style="--0:#D9F5DD;--1:#111111">"</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="line-length = 100indent = 2exclude = ["*_gen.sv", "build"]filelist = "rtl/files.f"[lint]select = ["no-tabs", "unused-signal"]ignore = ["module-filename"][lint.line-length]length = 120[lint.signal-name-style]style_regex = "[a-z_0-9]+""><div></div></button></div></figure></div>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="keys">Keys</h2><a class="sl-anchor-link" href="#keys"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Keys”</span></a></div>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -117,18 +119,22 @@
|
||||
<td><code dir="auto">[lint].select</code></td>
|
||||
<td>string array</td>
|
||||
<td style="text-align: right">defaults</td>
|
||||
<td>lint rule names</td>
|
||||
<td>CLI and server</td>
|
||||
<td>rule names or severity classes</td>
|
||||
<td>CLI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">[lint].ignore</code></td>
|
||||
<td>string array</td>
|
||||
<td style="text-align: right"><code dir="auto">[]</code></td>
|
||||
<td>lint rule names</td>
|
||||
<td>CLI and server</td>
|
||||
<td>rule names or severity classes</td>
|
||||
<td>CLI</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><code dir="auto">[lint.<rule-name>]</code> tables configure individual rules. The rule registry
|
||||
validates option names, types, bounds, and patterns; <code dir="auto">lucisv check --rules-doc</code>
|
||||
lists every supported option and default. Configuring a rule’s options does
|
||||
not enable a rule that is off by default.</p>
|
||||
<p><code dir="auto">filelist</code> does not change what a bare <code dir="auto">lucisv rtl/</code> formats. The CLI reads a filelist only when <code dir="auto">-f</code> names one.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="discovery">Discovery</h2><a class="sl-anchor-link" href="#discovery"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Discovery”</span></a></div>
|
||||
<p>For each input, lucisv searches upward from that path’s directory:</p>
|
||||
@@ -140,7 +146,7 @@
|
||||
</ol>
|
||||
<p>The first file wins; configuration files are never merged. CLI options override file values per setting. Exclusions are the exception: configuration and CLI patterns are combined.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="strict-parsing">Strict parsing</h2><a class="sl-anchor-link" href="#strict-parsing"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Strict parsing”</span></a></div>
|
||||
<p>Unknown keys, out-of-range numbers, invalid values, tables other than <code dir="auto">[lint]</code>, multiline arrays, and string escapes are rejected. A bad configuration is an error for the CLI, preventing partial writes. In an editor, the server reports the problem and falls back to the next available setting.</p>
|
||||
<p>Unknown keys, out-of-range numbers, invalid values, tables other than <code dir="auto">[lint]</code> and <code dir="auto">[lint.<rule>]</code>, and multiline arrays are rejected. This is a deliberate TOML subset. Top-level strings reject backslashes; per-rule strings retain backslashes literally for the pattern dialect and reject embedded quotes. They do not decode TOML string escapes. A bad configuration is an error for the CLI, preventing partial writes. In an editor, the server reports the problem and falls back to the next available setting.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="editor-settings">Editor settings</h2><a class="sl-anchor-link" href="#editor-settings"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Editor settings”</span></a></div>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -244,11 +250,36 @@
|
||||
<tr>
|
||||
<td><code dir="auto">lucisv.lint.ignore</code></td>
|
||||
<td style="text-align: right"><code dir="auto">[]</code></td>
|
||||
<td>Remove rules from the selected or default set</td>
|
||||
<td>Remove rules or severity classes from the selected or default set</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">lucisv.lint.severity.error</code> / <code dir="auto">.warning</code> / <code dir="auto">.style</code></td>
|
||||
<td style="text-align: right"><code dir="auto">true</code></td>
|
||||
<td>Enable each severity class</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">lucisv.lint.rules.<rule></code></td>
|
||||
<td style="text-align: right"><code dir="auto">default</code></td>
|
||||
<td>Override a rule with <code dir="auto">default</code>, <code dir="auto">on</code>, or <code dir="auto">off</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code dir="auto">lucisv.lint.options</code></td>
|
||||
<td style="text-align: right"><code dir="auto">{}</code></td>
|
||||
<td>Per-rule option objects, using the same validator as project configuration</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Project configuration takes priority over editor settings. For regular VS Code format-on-save, use <code dir="auto">editor.formatOnSave</code>; do not also enable <code dir="auto">lucisv.formatOnSave</code>.</p>
|
||||
<p>For formatting, project configuration wins over editor line length and
|
||||
indentation, then editor tab size supplies an indent fallback, then built-in
|
||||
defaults apply. For regular VS Code format-on-save, use <code dir="auto">editor.formatOnSave</code>;
|
||||
do not also enable <code dir="auto">lucisv.formatOnSave</code>.</p>
|
||||
<p>For lint selection, the server currently reads editor settings only. Project
|
||||
<code dir="auto">[lint] select/ignore</code> lists affect the CLI and are not inherited by the server.
|
||||
Selection proceeds through defaults → select → severity switches → per-rule
|
||||
toggles → ignore. Editor rule options overlay project rule options key by key.
|
||||
Invalid editor options are logged and dropped. Invalid project rule-option
|
||||
entries are currently dropped by server linting without a per-entry log;
|
||||
<code dir="auto">lucisv check</code> reports them as configuration errors.</p>
|
||||
<div class="sl-heading-wrapper level-h2"><h2 id="cache">Cache</h2><a class="sl-anchor-link" href="#cache"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 1 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 0 0-1.42-1.42m8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 1 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l3.88-3.89a4.49 4.49 0 0 0 0-6.33M8.83 15.17a1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.92-4.92a1 1 0 1 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42"></path></svg></span><span class="sr-only" data-pagefind-ignore>Section titled “Cache”</span></a></div>
|
||||
<p>Successful “already formatted” verdicts are cached under <code dir="auto">.lucisv_cache/</code>. Entries are keyed by file, content hash, line length, indentation, and lucisv version. Files that would change or fail are never cached. Use <code dir="auto">--no-cache</code> to disable reads and writes or <code dir="auto">--cache-dir</code> to relocate the store.</p>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/start/configuration.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-08-27T03:31:44.000Z">Aug 27, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/start/quick-start/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Quick start</span></span></a><a href="/guides/formatter/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Formatter</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
</div><footer class="sl-flex astro-xhxjzfa7"><div class="meta sl-flex astro-xhxjzfa7"><a href="https://git.luci.ooo/lucio/verilogrustformatter/src/branch/master/docs/site/src/content/docs/start/configuration.md" class="sl-flex print:hidden astro-xk5gmzsg"><svg aria-hidden="true" class="astro-xk5gmzsg astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a><p>Last updated: <time datetime="2026-09-03T09:28:11.000Z">Sep 3, 2026</time></p></div><div class="pagination-links print:hidden astro-jgq3vlii" dir="ltr"><a href="/start/quick-start/" rel="prev" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg><span class="astro-jgq3vlii">Previous<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Quick start</span></span></a><a href="/guides/formatter/" rel="next" class="astro-jgq3vlii"><svg aria-hidden="true" class="astro-jgq3vlii astro-n5k4ipy7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg><span class="astro-jgq3vlii">Next<br class="astro-jgq3vlii"><span class="link-title astro-jgq3vlii">Formatter</span></span></a></div></footer></div></div></main></div></div></div></div></body></html>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Quick start | lucisv</title><link rel="canonical" href="https://lucisv.dev/start/quick-start/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","softwareVersion":"0.9.0","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Quick start"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/start/quick-start/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Install lucisv, format your first SystemVerilog file, add linting to CI, and connect an editor."/><meta name="description" content="Install lucisv, format your first SystemVerilog file, add linting to CI, and connect an editor."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-vdxcvpsm"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Quick start | lucisv</title><link rel="canonical" href="https://lucisv.dev/start/quick-start/"/><link rel="sitemap" href="/sitemap-index.xml"/><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"lucisv","applicationCategory":"DeveloperApplication","operatingSystem":"macOS, Linux, Windows","license":"https://opensource.org/licenses/MIT","description":"A fast Verilog and SystemVerilog formatter, linter, and language server written in Rust.","codeRepository":"https://git.luci.ooo/lucio/verilogrustformatter"}</script><link rel="shortcut icon" href="/favicon.png" type="image/png"/><meta name="generator" content="Astro v7.2.8"/><meta name="generator" content="Starlight v0.41.9"/><meta property="og:title" content="Quick start"/><meta property="og:type" content="article"/><meta property="og:url" content="https://lucisv.dev/start/quick-start/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Install lucisv, format your first SystemVerilog file, add linting to CI, and connect an editor."/><meta name="description" content="Install lucisv, format your first SystemVerilog file, add linting to CI, and connect an editor."/><meta name="theme-color" content="#07111f"/><meta property="og:site_name" content="lucisv documentation"/><meta property="og:image" content="https://lucisv.dev/og.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:image:alt" content="lucisv — Verilog tooling that stays out of your way."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:image" content="https://lucisv.dev/og.png"/><script>
|
||||
window.StarlightThemeProvider = (() => {
|
||||
const storedTheme =
|
||||
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
||||
|
||||
@@ -31,7 +31,11 @@ localparam int LONGER = 22;
|
||||
// verilog_format: on
|
||||
```
|
||||
|
||||
`// lucisv: off` and `// lucisv: on` are aliases. Fences preserve exact bytes inside whole-item regions and also prevent lint fixes there.
|
||||
`// lucisv: off` and `// lucisv: on` are aliases. Fences preserve exact bytes between items (including class members) and
|
||||
between statements in blocks, forks, functions, tasks, and procedural bodies.
|
||||
They also prevent lint fixes there. A fence must begin on its own line;
|
||||
port/parameter lists, case-label lists, and property/sequence local declarations
|
||||
do not have independent fence scopes. Fenced text must still parse.
|
||||
|
||||
## Range formatting
|
||||
|
||||
@@ -47,7 +51,7 @@ The atomic unit is an item: selecting a statement formats its containing `always
|
||||
## Safety invariants
|
||||
|
||||
1. **Parse first.** Whole-file formatting produces no output for a file that cannot be fully parsed.
|
||||
2. **Preserve meaning.** Verification compares normalized syntax before accepting output.
|
||||
2. **Preserve meaning.** Verification re-lexes input and output and compares normalized tokens, including comments; it does not elaborate the design.
|
||||
3. **Converge.** Formatting twice reaches the same fixed point.
|
||||
4. **Write atomically.** An error leaves the affected file untouched.
|
||||
5. **Stay deterministic.** Parallel worker count changes performance, never output order or exit status.
|
||||
@@ -15,15 +15,31 @@ lucisv check --output-format json rtl/
|
||||
|
||||
## Selecting rules
|
||||
|
||||
`--select` replaces the default set with a comma-separated list. It can be repeated. `--ignore` then removes rules from the selected or default set. Both can also be written in `lucisv.toml` under a `[lint]` table (`select = [...]`, `ignore = [...]`), which a command-line flag overrides key by key, and in an editor as `lucisv.lint.select` / `lucisv.lint.ignore`.
|
||||
`--select` replaces the default set with a comma-separated list. It can be repeated. `--ignore` then removes rules from the selected or default set. Both accept rule names and the severity classes `error`, `warning`, and `style` (for example, `--ignore style`). Both can also be written in `lucisv.toml` under a `[lint]` table (`select = [...]`, `ignore = [...]`), which a command-line flag overrides key by key, and in an editor as `lucisv.lint.select` / `lucisv.lint.ignore`.
|
||||
|
||||
The semantic rules — `unused-signal`, `undriven-net`, `multiply-driven` — run by default wherever lucisv can see the other files of your project (`lucisv check rtl/`, or the language server), because it can then tell that another file reads a signal through a hierarchical path. Over a **single file** or a stdin buffer there is nothing to ask, so they are off and must be `--select`ed.
|
||||
|
||||
## Fixes
|
||||
|
||||
`--fix` applies safe changes and rewrites the file. Today, `no-tabs` and `no-trailing-whitespace` provide safe fixes. `--unsafe-fixes` widens applicability, but no built-in rule currently offers an unsafe fix.
|
||||
`--fix` applies safe changes and rewrites the file. Safe fixes include whitespace cleanup, `posix-eof`, `empty-item`,
|
||||
`undersized-binary-literal`, `explicit-begin`, `suggest-parentheses`, and
|
||||
`endif-comment`; the rule reference lists applicability per rule.
|
||||
`--unsafe-fixes` also permits the `always-comb` rewrite, whose scheduling
|
||||
semantics can differ from `always @*`. Editor quick fixes offer safe fixes only.
|
||||
|
||||
Fixes are sorted, overlap-checked, and never applied inside format-fenced regions.
|
||||
Fixes are sorted, overlap-checked, and filtered against format-fenced regions
|
||||
by the CLI and server. The reusable linter and `apply_fixes` API are
|
||||
fence-blind; callers performing automatic edits must apply that protection.
|
||||
|
||||
## Options and diagnostics
|
||||
|
||||
Use `[lint.<rule>]` in `lucisv.toml` or `lucisv.lint.options` in the editor for
|
||||
per-rule options. See [configuration](/start/configuration/) for precedence.
|
||||
`lucisv check --rules-doc` prints all 73 registered rules, their severity,
|
||||
default selection, fix applicability, and option defaults.
|
||||
|
||||
Text output uses `FILE:LINE:COL: severity: message [rule]`. JSON output is one
|
||||
array, with a `severity` field on each diagnostic.
|
||||
|
||||
## Waivers
|
||||
|
||||
@@ -39,4 +55,7 @@ endmodule
|
||||
|
||||
`verilog_lint:` is accepted in place of `lucisv:` for Verible compatibility. The `unused-waiver` rule reports malformed, unknown, or no-longer-needed suppressions when their target rule is enabled.
|
||||
|
||||
External waiver files are not implemented in v0.41.0; the planned waiver-file
|
||||
settings and CLI flag are not accepted yet.
|
||||
|
||||
See the [complete rule reference](/reference/rules/).
|
||||
@@ -12,8 +12,8 @@ lucisv follows the same separation of concerns that makes ruff fast and maintain
|
||||
| `vlog_linter` | rule registry, diagnostics, fixes, waiver engine | CLI and language server |
|
||||
| `vlog_semantic` | scopes, symbols, references, workspace units, external resolution | linter, refactors, language server |
|
||||
| `vlog_refactor` | rename, references, port propagation, instantiation planning | language server |
|
||||
| `lucisv_core` | configuration, filelists, walking, exclusions, cache | CLI and language server |
|
||||
| `lucisv` | argument parsing, parallel processing, output, atomic writes | command-line users and CI |
|
||||
| `lucisv_core` | configuration, filelists, walking, exclusions, cache, atomic replacement | CLI and language server |
|
||||
| `lucisv` | argument parsing, parallel per-file processing, reports, write orchestration | command-line users and CI |
|
||||
| `lucisv_server` | LSP transport, overlays, indexing, capabilities, editor settings | all LSP clients |
|
||||
|
||||
## Data flow
|
||||
@@ -31,15 +31,47 @@ lucisv follows the same separation of concerns that makes ruff fast and maintain
|
||||
<div><b>LSP</b>Queries, diagnostics, navigation, UI actions.</div>
|
||||
</div>
|
||||
|
||||
## Execution paths and ownership
|
||||
|
||||
- **Format:** strict parse → AST-to-document layout → width-aware printer →
|
||||
normalized token comparison → second parse/format and convergence check.
|
||||
Only a verified string is returned. Ranges splice whole items; format fences
|
||||
also protect statement scopes, and verification covers the complete output.
|
||||
- **Lint:** `ParsedSource` bundles one tokenization and tolerant parse;
|
||||
`LintContext` supplies source facts and lazy semantics. The registry selects
|
||||
73 rules with severities and validated options. Inline waivers filter findings,
|
||||
and the front ends protect fenced bytes before applying fixes.
|
||||
- **Refactor:** parsed spans and resolved references produce an edit plan;
|
||||
the engine checks the whole candidate edit before returning it. Server source
|
||||
selectors bound the input set but must include every file the engine might
|
||||
edit or refuse over. No formatter dependency is involved.
|
||||
- **Editor:** one ordered synchronous loop owns `Workspace`; open documents
|
||||
overlay disk facts. Scans publish index/include/completion batches together.
|
||||
Closed-file facts persist under codec 17; a bounded file-view cache serves
|
||||
queries that still need source text. Lazy port actions defer the edit until
|
||||
selection; recorded file-scope definition positions avoid a closed-file read.
|
||||
|
||||
`vlog_parser` and `lucisv_core` depend on no other crates. Formatting and
|
||||
semantics each depend on the parser; linting and refactoring depend on parser
|
||||
and semantics. The CLI composes core, parser, formatter, and linter; the server
|
||||
composes all six libraries. The linter's formatter dependency is test-only.
|
||||
External dependencies are confined to the CLI worker pool (`rayon`) and the
|
||||
server's synchronous LSP/JSON stack.
|
||||
|
||||
The main change-impact boundaries are the AST and all its walkers, formatter
|
||||
verification, persisted semantic facts, server state/ordering, and matching
|
||||
server/editor setting names. Source modules are split by grammar domain under
|
||||
`parser/`, `ast/`, `format/`, `bind/`, `workspace/`, `ports/`, and `server/`.
|
||||
|
||||
## Design invariants
|
||||
|
||||
- **Source fidelity:** comments and blank-line intent survive the parser.
|
||||
- **Determinism:** worker scheduling never affects ordering, formatting, or exit codes.
|
||||
- **Fixed points:** formatter tests require the second pass to match the first.
|
||||
- **Fixed points:** every successful formatting call requires the second pass to match the first.
|
||||
- **Conservative analysis:** incomplete cross-file knowledge produces false negatives rather than noisy false positives.
|
||||
- **Shared answers:** CLI and editor features call the same library APIs.
|
||||
- **Recoverable state:** caches are disposable; open buffers remain authoritative while an editor session is active.
|
||||
|
||||
## Release surface
|
||||
|
||||
One release builds the `lucisv` and `lucisv-server` binaries for Apple Silicon and Intel macOS, static-musl and RHEL-compatible glibc Linux, and Windows, plus the VS Code `.vsix` and checksums. The release tooling audits file type, dynamic linkage, and the glibc ceiling for cross-built artifacts.
|
||||
The supported publication surface is seven VS Code `.vsix` packages plus checksums: five platform packages (Apple Silicon/Intel macOS, x86-64/ARM64 static-musl Linux, Windows), one all-platform package, and one universal package requiring binaries on `PATH`. Both `lucisv` and `lucisv-server` are bundled in platform packages. Standalone binaries are built by the tooling but are not published as release assets. The release tooling audits file type, dynamic linkage, and the glibc ceiling for cross-built artifacts.
|
||||
@@ -40,17 +40,18 @@ The subcommand is recognized only as the first argument. To format a file named
|
||||
|
||||
| Option | Value | Effect |
|
||||
|---|---|---|
|
||||
| `--select` | rule list | Replace defaults with named rules; comma-separated and repeatable |
|
||||
| `--ignore` | rule list | Remove named rules from the enabled set |
|
||||
| `--select` | rule/class list | Replace defaults with named rules or `error`, `warning`, `style`; comma-separated and repeatable |
|
||||
| `--ignore` | rule/class list | Remove named rules or severity classes from the enabled set |
|
||||
| `--output-format` | `text` or `json` | Select human or machine-readable diagnostics |
|
||||
| `--fix` | — | Apply safe fixes and rewrite files |
|
||||
| `--unsafe-fixes` | — | Allow unsafe fixes when a rule provides them |
|
||||
| `--rules-doc` | — | Print registry-generated rule and option documentation and exit; takes no files |
|
||||
|
||||
Text diagnostics use `FILE:LINE:COL: message [rule]`. JSON output is one array of diagnostic objects.
|
||||
Text diagnostics use `FILE:LINE:COL: severity: message [rule]`. JSON output is one array of diagnostic objects, each carrying `severity`. JSON output is lint-only; formatter errors remain text on stderr.
|
||||
|
||||
## Filelists
|
||||
|
||||
An EDA `.f` filelist accepts one source path per line, nested `-f` entries, `+incdir+`, `+define+`, `#` or `//` comments, and `$VAR`/`${VAR}` expansion. Paths resolve relative to the filelist that names them. Include and define options are accepted but ignored because lucisv does not preprocess.
|
||||
An EDA `.f` filelist accepts one source path per line, nested `-f` entries, `+incdir+`, `+define+`, `#` or `//` comments, and `$VAR`/`${VAR}` expansion. Paths resolve relative to the filelist that names them. The CLI accepts include and define options without preprocessing. The server uses include directories for include navigation; neither front end expands cross-file macros while parsing.
|
||||
|
||||
Filelist paths bypass `--exclude` and `.gitignore`, just like direct command-line files. Duplicates are processed once. Unknown options, unset variables, and missing listed files warn without changing the exit code; an unreadable filelist is an error.
|
||||
|
||||
|
||||
@@ -48,9 +48,20 @@ The server speaks standard LSP over stdio. Features are derived from one in-memo
|
||||
| Pull diagnostics | `textDocument/diagnostic` | Returns current parse and lint diagnostics for a buffer |
|
||||
| Workspace diagnostics | `workspace/diagnostic` | Streams diagnostics across indexed files |
|
||||
| Published diagnostics | `textDocument/publishDiagnostics` | Updates clients that use push diagnostics |
|
||||
| Quick fixes | `textDocument/codeAction` | Exposes safe lint fixes and bulk safe fixes |
|
||||
| Quick fixes | `textDocument/codeAction` | Exposes safe lint fixes, bulk safe fixes, and port refactor offers |
|
||||
| Resolve port action | `codeAction/resolve` | Computes a selected port edit against current workspace state |
|
||||
| Execute command | `workspace/executeCommand` | Applies workspace-aware refactor actions |
|
||||
|
||||
Port edits are deferred when the client advertises code-action resolve support
|
||||
for `edit`; other clients receive eager edits. Lint fixes remain eager. An
|
||||
inapplicable or stale port action is rejected when resolved. Closed-file
|
||||
file-scope definition and workspace-symbol locations use recorded index
|
||||
positions; member locations and open buffers still use current text.
|
||||
|
||||
Inlay hints require the instantiated module to be in the active index scope.
|
||||
A missing hint can therefore be a scope limitation; use a filelist or workspace
|
||||
index scope when the defining module lives outside the default folder scope.
|
||||
|
||||
## Refactoring
|
||||
|
||||
| Tool | Protocol method | What it does |
|
||||
|
||||
@@ -11,7 +11,7 @@ Every `error`-class rule is held to one discipline: it goes **silent whenever th
|
||||
|
||||
This page is hand-written prose. The generated truth is `lucisv check --rules-doc`, which prints every rule with its class, default, fix and rationale straight from the registry — **and every option a rule takes, with its kind and default**.
|
||||
|
||||
A configurable rule is configured in a `[lint.<rule-name>]` table of a `lucisv.toml`, or from an editor in the `lucisv.lint.options` object; the option names are Verible's wherever it has the same option. An unknown rule or option name, a value of the wrong kind, an out-of-range integer or a pattern that does not compile fails a CLI run naming the file and the line, and is ignored (with a log line) in an editor.
|
||||
A configurable rule is configured in a `[lint.<rule-name>]` table of a `lucisv.toml`, or from an editor in the `lucisv.lint.options` object; the option names are Verible's wherever it has the same option. An unknown rule or option name, a value of the wrong kind, an out-of-range integer or a pattern that does not compile fails a CLI run naming the file and the line. Invalid editor option settings are logged and dropped; invalid project-file option entries are currently dropped silently by server linting.
|
||||
|
||||
```toml
|
||||
[lint.line-length]
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
---
|
||||
title: Rust API index
|
||||
description: Index of every public function and method in lucisv’s reusable Rust library crates.
|
||||
description: Navigational index of the main public APIs in lucisv’s reusable Rust library crates.
|
||||
---
|
||||
|
||||
<span class="badge">Public functions indexed</span>
|
||||
|
||||
This is a navigational API index, not source documentation. It lists the public callable surface of the six reusable library crates in the workspace; command-line and language-server binaries are documented in their dedicated references.
|
||||
This is a navigational API index, not source documentation. It summarizes the main public callable surface of the six reusable library crates in the workspace; command-line and language-server binaries are documented in their dedicated references.
|
||||
|
||||
The workspace baseline is v0.41.0. For the complete signatures and fields,
|
||||
run `cargo doc --workspace --no-deps`; this hand-maintained index is not an
|
||||
exhaustive replacement for rustdoc. The parser's strict and tolerant entry
|
||||
points share one grammar; tolerant errors do not imply formatter acceptance.
|
||||
Any thread calling parsing, analysis, or formatting on deeply nested input
|
||||
must provide at least `vlog_parser::PARSE_STACK_SIZE` (16 MiB) of stack.
|
||||
The CLI and server configure their worker threads accordingly.
|
||||
|
||||
## `vlog_parser`
|
||||
|
||||
@@ -55,7 +63,7 @@ This is a navigational API index, not source documentation. It lists the public
|
||||
|---|---|
|
||||
| `format_source` | Format a complete source string |
|
||||
| `format_range` | Format only items selected by line ranges |
|
||||
| `verify_equivalence` | Confirm normalized syntax is unchanged |
|
||||
| `verify_equivalence` | Re-lex and compare normalized tokens, including comments |
|
||||
| `verify_convergence` | Confirm a second formatting pass is identical |
|
||||
|
||||
### Document model and printer
|
||||
@@ -90,20 +98,26 @@ This is a navigational API index, not source documentation. It lists the public
|
||||
| `default_rules` | Return rules enabled for a single-file run |
|
||||
| `workspace_rules` | Return defaults plus project-aware semantic rules |
|
||||
| `rule_by_name` | Resolve a registered rule by stable name |
|
||||
| `select_rules` | Apply select/ignore names to the registry |
|
||||
| `select_rules` | Apply select/ignore rule names or severity classes to the registry |
|
||||
| `rules_named` | Expand a rule name or severity class to registered rules |
|
||||
| `module_interfaces` | Build the module interface facts used by lint oracles |
|
||||
| `rules_markdown` | Generate canonical Markdown rule documentation |
|
||||
|
||||
### Context, diagnostics, and fixes
|
||||
|
||||
| Type | Public surface |
|
||||
|---|---|
|
||||
| `ParsedSource` | `parse`, `lex_error`, `tokens`, `context` |
|
||||
| `LintContext` | `new`, `from_parse`, `with_tab_width`, `with_semantics`, `with_oracle`, `mentioned_elsewhere`, `has_oracle`, `semantics`, `source`, `tokens`, `file`, `line_index`, `path`, `tab_width`, `line_text`, `touches_string`, `comments` |
|
||||
| `MentionOracle` | Implement `mentioned_outside` to supply a project-wide identifier census |
|
||||
| `ParsedSource` | `parse`, `lex_error`, `tokens`, `file`, `context` |
|
||||
| `LintContext` | `new`, `from_parse`, `with_tab_width`, `with_line_length`, `with_options`, `with_semantics`, `with_oracle`, `mentioned_elsewhere`, `has_oracle`, `module_interface`, `parsed_cleanly`, `line_length`, `options`, `option_bool`, `option_int`, `option_str`, `option_list`, `option_is_set`, `semantics`, `source`, `tokens`, `file`, `line_index`, `path`, `tab_width`, `line_text`, `touches_string`, `comments` |
|
||||
| `MentionOracle` | Supply `mentioned_outside` and optional `module_interface` for project-aware checks |
|
||||
| `Violation` | `new`, `with_fix` |
|
||||
| `Fix` | `safe`, `unsafe_fix` |
|
||||
| `Applicability` | `as_str` |
|
||||
| module function | `apply_fixes` |
|
||||
| module function | `apply_fixes` (caller must filter format-fenced edits) |
|
||||
| `Severity` | `as_str`, `from_name`, `describes`; classes `Error`, `Warning`, `Style` |
|
||||
| `RuleOptions` | `new`, `is_empty`, `set_raw`, `set`, `overlay`, `is_set`, `bool`, `int`, `str`, `list` |
|
||||
| `OptionKind` / `OptionDefault` | `as_str`, `vocabulary` / `value`, `as_written` |
|
||||
| editor settings functions | `vscode_lint_settings`, `rule_setting`, `severity_setting` |
|
||||
|
||||
## `vlog_semantic`
|
||||
|
||||
@@ -112,7 +126,7 @@ This is a navigational API index, not source documentation. It lists the public
|
||||
| Function or type | Public methods |
|
||||
|---|---|
|
||||
| `analyze` | Build a semantic model for one parsed file |
|
||||
| `Semantics` | `scopes`, `symbols`, `symbols_named`, `references`, `file_scope`, `scope`, `symbol`, `symbol_at`, `reference_at`, `reference_id_at`, `reference`, `definition_of`, `references_of`, `document_symbols`, `resolution_counts`, `member_site`, `unit_site`, `instantiable_scope`, `member_scopes`, `file_span` |
|
||||
| `Semantics` | `scopes`, `symbols`, `symbols_named`, `duplicates`, `references`, `file_scope`, `scope`, `symbol`, `symbol_at`, `reference_at`, `reference_id_at`, `reference`, `definition_of`, `references_of`, `document_symbols`, `resolution_counts`, `member_site`, `unit_site`, `instantiable_scope`, `member_scopes`, `file_span` |
|
||||
| `Reference` | `resolved`, `is_external_candidate`, `is_inherited_candidate` |
|
||||
| `Import` | `path`, `supplies` |
|
||||
| `Scope` | `lookup_local`, `extends` |
|
||||
@@ -121,15 +135,20 @@ This is a navigational API index, not source documentation. It lists the public
|
||||
|
||||
| Function or type | Public methods |
|
||||
|---|---|
|
||||
| `WorkspaceIndex` | `build`, `files`, `path`, `file_id`, `units`, `member`, `members_of`, `members_of_chain`, `member_unit`, `instantiations_of`, `subclasses_of`, `base_of`, `instantiations`, `subclasses`, `facts_for`, `defines`, `find_define`, `references_to`, `references_are_ambiguous`, `files_spelling`, `files_mentioning`, `mentioned_outside`, `workspace_symbols`, `units_of`, `instantiable_units`, `counts`, `update_file`, `update_facts`, `absorb`, `remove_file`, `fingerprint` |
|
||||
| `WorkspaceIndex` | `build`, `files`, `path`, `file_id`, `units`, `member`, `members_of`, `members_of_chain`, `member_unit`, `instantiations_of`, `subclasses_of`, `base_of`, `instantiations`, `subclasses`, `facts_for`, `defines`, `find_define`, `references_to`, `references_are_ambiguous`, `files_spelling`, `files_mentioning`, `files_naming_in_macros`, `mentioned_outside`, `workspace_symbols`, `units_of`, `instantiable_units`, `counts`, `update_file`, `update_facts`, `absorb`, `remove_file`, `fingerprint` |
|
||||
| `IndexBuilder` | `new`, `add_file`, `add_facts`, `finish` |
|
||||
| `FileFacts` | `of`, `from_analysis`, `words`, `path`, `encode`, `decode` |
|
||||
| `FileFacts` | `of`, `from_analysis`, `words`, `macro_words`, `path`, `encode`, `decode` |
|
||||
| `DefinitionKey` | `of` |
|
||||
| `resolve_external` | Resolve unresolved file references against a workspace index |
|
||||
| `ExternalTarget` | `defs`, `best` |
|
||||
| `ExternalResolutions` | `get`, `iter`, `counts`, `definition_of` |
|
||||
| `index_order` | Sort workspace inputs into their deterministic index order |
|
||||
| `words::harvest` / `harvest_text` | Build the shared identifier census from tokens or source text |
|
||||
| `words::harvest` / `harvest_text` / `harvest_raw` | Build the shared identifier census from tokens or source text |
|
||||
|
||||
`FACTS_FORMAT` is **17**. Cached facts include normal and macro identifier
|
||||
censuses; `Def::lines.positions` can carry `DeclPositions` with UTF-16 ranges
|
||||
for file-scope declarations. Any persisted shape or fact-census change needs
|
||||
a codec-version decision so stale caches cannot silently omit answers.
|
||||
|
||||
## `vlog_refactor`
|
||||
|
||||
@@ -156,6 +175,7 @@ This is a navigational API index, not source documentation. It lists the public
|
||||
| `enclosing_module` | Return the module containing a cursor position |
|
||||
| `module_definition` | Find a unique indexed module definition |
|
||||
| `module_names` | Search indexed module names |
|
||||
| `sites_phrase` | Share the port-action site-count wording with server offers |
|
||||
| `instantiation_plan` | Build an instantiation plan from an indexed module |
|
||||
| `PortAction` | `label` |
|
||||
| `InstantiationPlan` | `instance_name`, `has_escaped_identifier`, `render`, `render_with` |
|
||||
@@ -173,10 +193,11 @@ This is a navigational API index, not source documentation. It lists the public
|
||||
| `walk::collect_files` | Walk inputs with ignores and exclusions |
|
||||
| `walk::is_excluded` | Test a path against exclusion patterns |
|
||||
|
||||
### Cache
|
||||
### Atomic writes and cache
|
||||
|
||||
| Function or type | Public methods |
|
||||
|---|---|
|
||||
| `atomic::write_atomic` | Replace file contents through a sibling temp file and rename; callers must coordinate concurrent writes to one target |
|
||||
| `content_hash` | Compute the cache’s FNV-1a content fingerprint |
|
||||
| `Cache` | `load`, `disabled`, `is_clean`, `record`, `store` |
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@ filelist = "rtl/files.f"
|
||||
[lint]
|
||||
select = ["no-tabs", "unused-signal"]
|
||||
ignore = ["module-filename"]
|
||||
|
||||
[lint.line-length]
|
||||
length = 120
|
||||
|
||||
[lint.signal-name-style]
|
||||
style_regex = "[a-z_0-9]+"
|
||||
```
|
||||
|
||||
## Keys
|
||||
@@ -24,8 +30,13 @@ ignore = ["module-filename"]
|
||||
| `indent` | integer | `2` | `1..8` | CLI and server |
|
||||
| `exclude` | string array | `[]` | path patterns | CLI walk and server index |
|
||||
| `filelist` | string | — | EDA `.f` path | server index |
|
||||
| `[lint].select` | string array | defaults | lint rule names | CLI and server |
|
||||
| `[lint].ignore` | string array | `[]` | lint rule names | CLI and server |
|
||||
| `[lint].select` | string array | defaults | rule names or severity classes | CLI |
|
||||
| `[lint].ignore` | string array | `[]` | rule names or severity classes | CLI |
|
||||
|
||||
`[lint.<rule-name>]` tables configure individual rules. The rule registry
|
||||
validates option names, types, bounds, and patterns; `lucisv check --rules-doc`
|
||||
lists every supported option and default. Configuring a rule's options does
|
||||
not enable a rule that is off by default.
|
||||
|
||||
`filelist` does not change what a bare `lucisv rtl/` formats. The CLI reads a filelist only when `-f` names one.
|
||||
|
||||
@@ -42,7 +53,7 @@ The first file wins; configuration files are never merged. CLI options override
|
||||
|
||||
## Strict parsing
|
||||
|
||||
Unknown keys, out-of-range numbers, invalid values, tables other than `[lint]`, multiline arrays, and string escapes are rejected. A bad configuration is an error for the CLI, preventing partial writes. In an editor, the server reports the problem and falls back to the next available setting.
|
||||
Unknown keys, out-of-range numbers, invalid values, tables other than `[lint]` and `[lint.<rule>]`, and multiline arrays are rejected. This is a deliberate TOML subset. Top-level strings reject backslashes; per-rule strings retain backslashes literally for the pattern dialect and reject embedded quotes. They do not decode TOML string escapes. A bad configuration is an error for the CLI, preventing partial writes. In an editor, the server reports the problem and falls back to the next available setting.
|
||||
|
||||
## Editor settings
|
||||
|
||||
@@ -66,9 +77,23 @@ Unknown keys, out-of-range numbers, invalid values, tables other than `[lint]`,
|
||||
| `lucisv.index.cachePath` | `""` | Override the persistent index location |
|
||||
| `lucisv.largeFile.threshold` | `4194304` | Switch oversized open buffers to large-file mode |
|
||||
| `lucisv.lint.select` | `[]` | Replace the default lint rule set |
|
||||
| `lucisv.lint.ignore` | `[]` | Remove rules from the selected or default set |
|
||||
| `lucisv.lint.ignore` | `[]` | Remove rules or severity classes from the selected or default set |
|
||||
| `lucisv.lint.severity.error` / `.warning` / `.style` | `true` | Enable each severity class |
|
||||
| `lucisv.lint.rules.<rule>` | `default` | Override a rule with `default`, `on`, or `off` |
|
||||
| `lucisv.lint.options` | `{}` | Per-rule option objects, using the same validator as project configuration |
|
||||
|
||||
Project configuration takes priority over editor settings. For regular VS Code format-on-save, use `editor.formatOnSave`; do not also enable `lucisv.formatOnSave`.
|
||||
For formatting, project configuration wins over editor line length and
|
||||
indentation, then editor tab size supplies an indent fallback, then built-in
|
||||
defaults apply. For regular VS Code format-on-save, use `editor.formatOnSave`;
|
||||
do not also enable `lucisv.formatOnSave`.
|
||||
|
||||
For lint selection, the server currently reads editor settings only. Project
|
||||
`[lint] select/ignore` lists affect the CLI and are not inherited by the server.
|
||||
Selection proceeds through defaults → select → severity switches → per-rule
|
||||
toggles → ignore. Editor rule options overlay project rule options key by key.
|
||||
Invalid editor options are logged and dropped. Invalid project rule-option
|
||||
entries are currently dropped by server linting without a per-entry log;
|
||||
`lucisv check` reports them as configuration errors.
|
||||
|
||||
## Cache
|
||||
|
||||
|
||||
+89
-34
@@ -3,8 +3,9 @@
|
||||
**Purpose.** This document is the map an agent reads before touching anything:
|
||||
which modules depend on which, which features consume which, and where the
|
||||
two graphs meet. It exists to make parallel multi-agent development safe —
|
||||
every edge below is an interface somebody can break, and every *absent* edge
|
||||
is a place two agents can work at the same time without talking.
|
||||
every edge below is an interface somebody can break. An absent edge is only
|
||||
a candidate for independent work: confirm current imports, shared files, and
|
||||
open handshakes before assigning ownership.
|
||||
|
||||
Sources of truth this document is derived from (and defers to on conflict):
|
||||
each crate's `Cargo.toml`, each feature's `docs/features/<name>/README.md`
|
||||
@@ -23,14 +24,22 @@ null-items (108 feature READMEs); updated 2026-09-02 through v0.33.0 for the
|
||||
testbench grammar/semantics wave, comment slots, bind semantics, SVA bodies,
|
||||
and the four decomposition rounds (125 feature READMEs).
|
||||
|
||||
**Code audit: 2026-09-04, HEAD `d5abf81`, after the v0.41.0 release (`97aa2fe`).** The crate
|
||||
edges below were checked against all eight manifests. Current facts codec:
|
||||
**17**. Recent feature contracts are summarized in §1.4. HEAD
|
||||
also contains **parser-skips** (TODO §38): implementation committed and QA
|
||||
accepted, intended for v0.42.0; it is not part of the v0.41.0 release. External
|
||||
waiver files (TODO §39) remain planned. See [repository-analysis.md](repository-analysis.md)
|
||||
for findings, validation, and the distinction between measured and historical results.
|
||||
|
||||
**Edge notation, used in all three sections:**
|
||||
|
||||
| notation | meaning |
|
||||
|---|---|
|
||||
| `A ──▶ B` | **A depends solely on B.** A consumes B's published interface; B was not changed for A and does not know A exists. Breaking B's interface breaks A; breaking A costs B nothing. |
|
||||
| `A ──▶ B` | **A consumes B.** This edge does not imply B is A's only dependency. A consumes B's published interface; B was not changed for A and does not know A exists. Breaking B's interface breaks A; breaking A costs B nothing. |
|
||||
| `A ◀──▶ B` | **Handshake.** A negotiated, two-sided contract: B changed something *for* A (or both sides pin one wire shape / file format / naming convention), and the contract is written down in one or both READMEs. Either side moving unilaterally breaks the other. |
|
||||
| `A ─▶ B` | **Not a dependency** — a one-way note whose `kind` column says what it is: `sequencing` (corpus files handed from one bucket to the next), `standing promise` (A imposes a rule on B and its successors), `open request`, or `depends (consumed by)` — the last reads **B depends on A**. |
|
||||
| *(absent)* | The two are independent. Independent pairs are **not listed** — their absence is the claim. |
|
||||
| *(absent)* | No dependency is recorded here. Confirm source and file ownership before treating the pair as independent. |
|
||||
|
||||
A handshake that was **requested but not yet delivered** is an *open
|
||||
handshake*; those are collected in §2.9 because they are exactly the
|
||||
@@ -41,7 +50,7 @@ coordination points parallel agents must not both grab.
|
||||
## 1. Module dependency graph
|
||||
|
||||
"Module" here means: the eight workspace crates, the two editor trees, and
|
||||
the script layer (`tools/`, `scripts/`, CI). Intra-crate structure that
|
||||
the script layer (`tools/`, `scripts/`, CI), and the documentation site. Intra-crate structure that
|
||||
matters for parallel work is in §1.3.
|
||||
|
||||
### 1.1 Crate-level graph
|
||||
@@ -76,18 +85,20 @@ graph TD
|
||||
TOOLS -.builds/packages.-> SRV
|
||||
TOOLS -.builds/packages.-> VSC
|
||||
CI[Gitea Actions] --> TOOLS
|
||||
DOCS[docs/site] -.documents CLI and generated rule reference.-> CLI
|
||||
DOCS -.documents protocol.-> SRV
|
||||
CORPUS[scripts/ + tools/corpus_*] -.exit codes, msg prefixes.-> CLI
|
||||
```
|
||||
|
||||
*(The diagram shows direction only; §1.2 is authoritative on `depends` vs
|
||||
`handshake` for each edge.)*
|
||||
|
||||
External dependencies (all exactly pinned in the workspace `Cargo.toml`):
|
||||
External Rust dependencies (all exactly pinned in the workspace `Cargo.toml`):
|
||||
`rayon` (CLI only, sanctioned by TODO §3), `lsp-server` + `lsp-types` +
|
||||
`serde`/`serde_json` (server only, sanctioned by TODO §6). Those are the only
|
||||
**direct** external dependencies; everything the workspace itself writes is
|
||||
std (they pull in ~20 transitive crates — see `Cargo.lock` — which is what an
|
||||
audit counts, not what an agent can call). `lsp-types` carries
|
||||
std. Resolved transitive dependencies are recorded in `Cargo.lock`; Node
|
||||
dependencies for the editor and documentation site have separate manifests. `lsp-types` carries
|
||||
`features = ["proposed"]` for LSP 3.18 `inlineCompletion` (inline-templates).
|
||||
|
||||
### 1.2 Crate edges, documented
|
||||
@@ -100,17 +111,17 @@ what a change on the pointed-to side must not silently break.
|
||||
| `vlog_formatter ──▶ vlog_parser` | depends | `parse(tokens, source)` / `parse_source`, the whole AST, `tokenize` (re-used by `verify.rs` to re-lex both sides of the safety net), trivia attachment (`Meta::{leading,trailing,before_sep,attrs}` — comments are never dropped), `RawText.col` (the dedent column for verbatim re-indent), spans. The formatter is the AST's primary consumer: **every new `ItemKind`/`StmtKind`/`ExprKind` variant costs an arm in `format/`** (its matches are exhaustive). |
|
||||
| `vlog_semantic ──▶ vlog_parser` | depends | The AST read-only, `parse_source_tolerant`/`parse_tolerant` (never fails; `Error` nodes are opaque leaves), the **name-span contract** `src[name_span] == name` on every declaring node, `token::is_keyword`, `defines::collect_defines`/`DefineTable`, `TextRange`. `bind/`'s `ItemKind`/`ExprKind`/`DimKind` matches are exhaustive — new variants cost an arm here too. |
|
||||
| `vlog_linter ──▶ vlog_parser` | depends | `ParsedSource::parse` = `tokenize` + `parse_tolerant` (one-parse bundle), `LineIndex`, `TextRange`, AST shapes walked by `visit.rs` (which ends in `_ => {}`, so new variants usually cost nothing here), token facts for text rules (a macro use is one `Ident` token; a directive is one `Directive` token). |
|
||||
| `vlog_linter ──▶ vlog_semantic` | depends | `analyze`, `Semantics::{symbols, references, references_of}` for the three semantic rules (`unused-signal`, `undriven-net`, `multiply-driven`). Lazy: a run with no semantic rule enabled never calls `analyze`. Justified in `vlog_linter/Cargo.toml`; adds no external code (`vlog_semantic` is `vlog_parser` + std). |
|
||||
| `vlog_linter ──▶ vlog_semantic` | depends | `analyze`, `Semantics::{symbols, references, references_of}` for semantic rules, including signal usage and duplicate-declaration checks. `Semantics::duplicates()` was added by linter-expansion-1 without changing persisted facts. `LintContext::semantics()` computes analysis lazily when a rule asks for it. Justified in `vlog_linter/Cargo.toml`; adds no external code (`vlog_semantic` is `vlog_parser` + std). |
|
||||
| `vlog_linter ──▶ vlog_formatter` **(dev-only)** | depends (tests) | The `.lint` fix harness asserts a lint fix never produces text `format_source` refuses. **The library dependency list is still `vlog_parser` + `vlog_semantic` + std** — `cargo tree -p vlog_linter -e normal` is the pinned check. Do not promote this to a normal dep; the fence filter deliberately lives in the front ends instead (see shared-fence-filter, §2.4). |
|
||||
| `vlog_refactor ──▶ vlog_parser` | depends | `tokenize`, `parse_source_tolerant` + diagnostics, `LineIndex`, `TextRange`, the port/instantiation/module AST shapes, `token::is_keyword` (new-name validity), `defines` via the index. Every edit span originates in a parsed node — no textual search-and-replace. |
|
||||
| `vlog_refactor ──▶ vlog_semantic` | depends | `Semantics` queries (`symbol_at`, `references_of`, `reference_id_at`, …), `Resolution` variants (three of them are refusal rules), `WorkspaceIndex` + `resolve_external` + `ExternalTarget`, and the exactness promise on `name_span` (re-checked before each edit is emitted). One historical exception: refactor-rename added `Target::Declaration` + end-label uses *into* `vlog_semantic` (lead-authorized, additive — see §2.6). |
|
||||
| `lucisv ──▶ lucisv_core` | depends | `config::{FileConfig, Discovery}` (lucisv.toml discovery — `config::parse` is reached through `Discovery`, not called directly), `walk::{collect_files, EXTENSIONS}` (the `.gitignore`/`--exclude` walk), `filelist::read` (`-f`), `cache` (the format cache). (`walk::is_excluded` is `pub` but currently has no consumer outside the crate.) |
|
||||
| `lucisv ──▶ lucisv_core` | depends | `config::{FileConfig, Discovery}` (lucisv.toml discovery — `config::parse` is reached through `Discovery`, not called directly), `walk::{collect_files, EXTENSIONS}` (the `.gitignore`/`--exclude` walk), `filelist::read` (`-f`), `cache` (the format cache), `atomic::write_atomic` (formatter and lint-fix replacement). (`walk::is_excluded` is `pub` but currently has no consumer outside the crate.) |
|
||||
| `lucisv ──▶ vlog_formatter` | depends | `format_source` / `format_range` / `LineRanges` / `Config` / `FormatError`, and `fence::{protected_regions, is_protected}` (the `--fix` fence filter — the linter crate deliberately has no fence notion). |
|
||||
| `lucisv ──▶ vlog_linter` | depends | The public linter API for `lucisv check` — `lint` + `LintContext`/`ParsedSource`, `apply_fixes`, `select_rules` (the CLI does not call `run` itself). Relies on: rule names stable, linting never panics/writes, findings sorted by `(span.start, span.end, rule)`. |
|
||||
| `lucisv ──▶ vlog_parser` | depends | `LineIndex` / `TextRange` for lint report coordinates, plus `PARSE_STACK_SIZE` for both the named `lucisv` thread and rayon workers. (The CLI otherwise reaches the parser through the formatter and linter.) |
|
||||
| `lucisv ──▶ rayon` | depends | The worker pool. Pinned exactly; pool must keep `stack_size(vlog_parser::PARSE_STACK_SIZE)` (currently 16 MiB; recursion-limit handshake) or the parser's depth guarantee regresses to a stack overflow. |
|
||||
| `lucisv_server ──▶ lucisv_core` | depends | Same config discovery and walk as the CLI (that sameness is the point — format-on-save must agree with `lucisv --check`), `filelist::read` (index scope rung 1, `+incdir+` for the include graph), `cache::content_hash` (re-used by the persistent index cache — one FNV-1a, not two). |
|
||||
| `lucisv_server ──▶ vlog_parser` | depends | `tokenize`, `parse_source_tolerant`/`parse_tolerant`, `ParseDiagnostic`, `LineIndex`, `TextRange`, tokens + trivia, `defines`, `KEYWORDS` (completion keyword tier; also the source the VS Code grammar is generated from), and `PARSE_STACK_SIZE` for the named `lucisv-main` thread. |
|
||||
| `lucisv_server ──▶ vlog_parser` | depends | `tokenize`, `parse_source_tolerant`/`parse_tolerant`, `ParseDiagnostic`, `LineIndex`, `TextRange`, tokens + trivia, `defines`, `KEYWORDS` (completion keyword tier; also the source the hand-maintained VS Code grammar is test-locked to), and `PARSE_STACK_SIZE` for the named `lucisv-main` thread. |
|
||||
| `lucisv_server ──▶ vlog_semantic` | depends | `analyze`/`Semantics` (every navigation answer), `WorkspaceIndex` (build/incremental update, units/members/defines, `instantiations_of`/`subclasses_of` edge tables, `FileFacts` codec for the persistent cache), `resolve_external` overlay, `index_order`/`IndexBuilder` (watched builds). |
|
||||
| `lucisv_server ◀──▶ vlog_semantic` | handshake | Two negotiated additions, both 2026-08-28 and both additive: **`Symbol::detail_span` / `Def::detail_span`** (where a non-ANSI port's body declaration completes the header that names it — the server's hover card and `nav::definition` both read it, and they show/jump to it in the same order), and **`Semantics::symbols_named`** (name → declarations, built in `analyze`, in declaration order — the server replaced two scan-every-symbol loops with it and the *first-match tie-break must stay declaration order* or hover's choice between two live declarations of one name changes). `docs/features/port-detail-spans/README.md`. |
|
||||
| `lucisv_server ◀──▶ vlog_semantic` | handshake | Three later additive performance surfaces: **`DeclLines` / `Def::lines`** record declaration and detail lines at index time (`FACTS_FORMAT` 3 → 4); **`WorkspaceIndex::absorb`** folds a scan batch with one merge rather than one merge per file; and **`WorkspaceIndex::files_spelling`** finds external uses by spelling, resolved or not, for rename's dangling-use refusal. The first feeds hover-line-index, the second scan-interleave, and the third refactor-rename's six-rung fan-out. Changing the facts codec, reference-fact census or merge semantics breaks those consumers. |
|
||||
@@ -158,7 +169,7 @@ what a change on the pointed-to side must not silently break.
|
||||
grammar, depth/chain budgets from recursion-limit — since the 2026-09-02
|
||||
decomposition one module per grammar domain: `cursor`, `recover`,
|
||||
`directive`, `split`, `verbatim`, `item`, `module`, `decl`, `tf`,
|
||||
`instance`, `stmt`, `keyword_stmt`, `expr`, `primary`, `class`,
|
||||
`instance`, `recover_list` (header/list-local tolerant recovery), `stmt`, `keyword_stmt`, `expr`, `primary`, `class`,
|
||||
`covergroup`, `assertion`, `sva`, tests in `parser/tests/`) → `ast/`
|
||||
(`mod` holds `Meta`/`Comment`/spans/`RawText`; `module`, `decl`, `stmt`,
|
||||
`expr`, `class`, `covergroup`, `sva` hold the nodes, all re-exported as
|
||||
@@ -194,7 +205,7 @@ incremental update and `fingerprint`, `record` = the `FileFacts` read-off,
|
||||
inheritance edge tables, incremental `update_file`/`remove_file`,
|
||||
reference postings, `files_spelling`, batch `absorb`, declaration `DeclLines`,
|
||||
`fingerprint`); `facts.rs` (`FileFacts` codec for the persistent cache;
|
||||
`FACTS_FORMAT` is 16);
|
||||
`FACTS_FORMAT` is 17);
|
||||
`instantiations.rs`, `classes.rs` (the shared walks, lifted from the server
|
||||
so the index census and the request handlers cannot drift).
|
||||
|
||||
@@ -202,9 +213,13 @@ so the index census and the request handlers cannot drift).
|
||||
upward search with its per-instance cache), `walk.rs` (`collect_files`,
|
||||
`EXTENSIONS`, `.gitignore`/`--exclude` filtering), `filelist.rs` (the `.f`
|
||||
reader: files, `+incdir+`, defines, warnings), `cache.rs` (the format cache +
|
||||
`content_hash` — the one FNV-1a the server's index cache also reuses). Knows
|
||||
nothing of Verilog; depends on nothing; owns two open handshakes (§2.9-1,
|
||||
§2.9-8).
|
||||
`content_hash` — the one FNV-1a the server's index cache also reuses),
|
||||
`atomic.rs` (shared replacement for CLI source writes and the format cache). Knows
|
||||
nothing of Verilog; depends on nothing. Config stores `LintOption` entries
|
||||
raw with source/line information; front ends validate them through
|
||||
`vlog_linter::RuleOptions`, so core still has no linter dependency. Open
|
||||
contracts include path normalization, walk cycles, and same-target write
|
||||
coordination (§2.9-1, §2.9-8, §2.9-26).
|
||||
|
||||
**`vlog_linter`** — `registry.rs` (`Rule` trait, `all_rules`/`default_rules`/
|
||||
`select_rules`), `rules/` (one file per rule; names are **stable API** — they
|
||||
@@ -212,10 +227,14 @@ appear in users' waivers), `context.rs` (`LintContext<'a>`, `ParsedSource`,
|
||||
lazy `semantics()`), `visit.rs` (the item/statement walk), `waiver.rs`,
|
||||
`violation.rs` (+ `Fix`, `Applicability`), `signals.rs` (the shared signal
|
||||
table for the three semantic rules), `naming.rs`, `rule_docs.rs`
|
||||
(`rules_markdown()` — docs generated from the registry).
|
||||
(`rules_markdown()` — docs generated from the registry). There are 73 rules;
|
||||
`severity.rs` classifies them, `options.rs` validates per-rule configuration,
|
||||
`regex.rs` implements the bounded pattern dialect, and `vscode.rs` generates
|
||||
editor rule toggles. `decls.rs`, `module_decls.rs`, `exprs.rs`, `preproc.rs`,
|
||||
`literal.rs`, and `interfaces.rs` share facts and walks across the rule families.
|
||||
|
||||
**`vlog_refactor`** — `rename/` (`mod` = the rename, `scope` = the crate-wide
|
||||
`Scope` cache, `warnings` = the text scans, `tests` = the parity suite;
|
||||
**`vlog_refactor`** — crate-level `scope.rs` owns the shared `Scope` cache;
|
||||
`rename/` (`mod` = the rename, `warnings` = the text scans, `tests` = the parity suite;
|
||||
also the engine of `references.rs::find_references`; publishes the cheap
|
||||
`prepare_rename_here`/`rename_name_at` selectors whose parity with the full
|
||||
engine is test-pinned), `ports/` (one file per refactoring: `find`, `add`,
|
||||
@@ -231,7 +250,7 @@ startup — **keep it that way**, cli-polish → parallel-files handshake),
|
||||
`args.rs`, `diff.rs`, `lint.rs` (the `check` subcommand; owns the CLI-side
|
||||
fence filter).
|
||||
|
||||
**`lucisv_server`** — layered, 57 production files (`includes.rs` is the one file that
|
||||
**`lucisv_server`** — layered by responsibility (`includes.rs` is the one file that
|
||||
spans two layers — the include graph *and* the `documentLink` handler;
|
||||
`perf.rs` is `#[cfg(test)]`-only and is not a layer — see
|
||||
`docs/perf/README.md`):
|
||||
@@ -250,7 +269,7 @@ capabilities), `package.json` (languages, grammar, snippets, settings,
|
||||
colour ids), `syntaxes/` (hand-maintained grammar, test-locked to
|
||||
`KEYWORDS`), `snippets/` (static, server-independent), `restart.js` (the one
|
||||
serialized start/restart chain, so a `lucisv.verbose` toggle cannot be lost to
|
||||
an in-flight start — shipped, and the only module `extension.js` requires),
|
||||
an in-flight start — shipped, shared by the extension restart paths),
|
||||
`hierarchyView.js`/`hierarchyModel.js` (the indexed instance hierarchy sidebar),
|
||||
`smoke.js` (headless handshake check) and `restart_test.js` (headless check of
|
||||
that chain, against a scripted fake client), `README.md` (the Marketplace
|
||||
@@ -258,6 +277,37 @@ Details page, owned by editor-marketplace-page).
|
||||
|
||||
---
|
||||
|
||||
**`docs/site`** — Astro/Starlight content in `src/content/docs/`, sidebar and
|
||||
metadata in `astro.config.mjs`, styles in `src/styles/custom.css`, and tracked
|
||||
static output/search in `dist/`. It consumes the CLI/API/LSP contracts as
|
||||
documentation, not through a Rust build dependency. Its rule page is editorial;
|
||||
`lucisv check --rules-doc` is registry-generated truth. Rebuild the tracked
|
||||
output after content changes, and keep historical measurements dated.
|
||||
|
||||
### 1.4 Contracts added since the decomposition baseline
|
||||
|
||||
| Feature | Surfaces that must move together | Current state |
|
||||
|---|---|---|
|
||||
| macro-word-census | semantic `FileFacts::macro_words`, `files_naming_in_macros`, codec 17 ↔ server rename warnings; linter `rules_markdown` → CLI `--rules-doc` | Delivered; §2.9-5 and -18 closed |
|
||||
| interface-dpi-arms | parser AST/formal arguments → formatter, binder, spans and argument consumers | Delivered in v0.35.0 |
|
||||
| statement-fences | formatter `fence.rs` ↔ `format/stmt.rs`, routine bodies and `range.rs`; front ends keep consuming `protected_regions` | Delivered; §2.9-3 closed |
|
||||
| header-recovery | parser `ListElem::{Ok,Error}`, `ExprKind::Error`, `recover_list.rs` → formatter, semantic, linter, refactor and server list walkers | Tolerant mode preserves valid siblings; strict formatting still rejects malformed input |
|
||||
| linter-expansion-1 | `Severity`, `Violation::severity`, `rules_named`, `MentionOracle::module_interface`, `Semantics::duplicates` ↔ CLI reports, server diagnostics/settings, generated VS Code toggles | Delivered; duplicate facts are in-memory only |
|
||||
| linter-expansion-2 | core `FileConfig::lint_options`/`LintOption` → linter `RuleOptions`; registry specs ↔ CLI validation, server option overlay and editor settings | Delivered; core records raw values and does not depend on the linter |
|
||||
| linter-expansion-3 | shared scoped-item/expression/preprocessor walkers ↔ 73-rule registry, rule docs and generated editor toggles | Delivered; rule names and option keys are user-facing contracts |
|
||||
| small-items-3 | parser `ItemKind::GenBlock` → every recursive item walker; `recover_list` lookahead; core `atomic::write_atomic` → CLI format/fix and format cache | Delivered in v0.40.0; atomic replacement does not yet coordinate same-target writers (§2.9-26) |
|
||||
| lazy-code-action | refactor `sites_phrase` ↔ server `ports.rs`; `ClientAbilities::code_action_resolve` ↔ dispatch and `{uri, position, title}` action data; indexed `DeclPositions` → `locate::definition_location` | Delivered in v0.41.0; clients without resolve support retain eager port actions, lint fixes remain eager |
|
||||
| parser-skips | parser `module.rs`/`split.rs` rival-header detection; `DataDecl::delay: Option<NetDelay>` → formatter `format/decl.rs` and semantic `bind/decl.rs` | **Committed after v0.41.0; QA accepted, release pending**; preserves the written delay position; no verifier normalization change |
|
||||
| external waiver files | proposed linter waiver parser ↔ core config, CLI args, server settings/diagnostics and VS Code manifest | **Planned (TODO §39)**; no callable API, CLI flag, or config setting yet |
|
||||
|
||||
The lazy action resolves against current workspace state and rejects a stale
|
||||
or inapplicable action. Indexed definition locations bypass closed-file reads
|
||||
only for file-scope declarations carrying `DeclPositions`; members and open
|
||||
buffers retain the text-based path. Missing inlay hints can reflect a module
|
||||
outside the configured index scope, rather than a hint-generation failure.
|
||||
|
||||
---
|
||||
|
||||
## 2. Feature dependency graph
|
||||
|
||||
125 features. They cluster into eight lanes; edges inside a lane are listed in
|
||||
@@ -491,7 +541,7 @@ promise:
|
||||
| `refactor-instantiate (M4) ──▶ workspace-index, editor-scopes` | depends | Plans from the index's real definitions; the item-position gate is built on `pairs::analyze`'s published output only. |
|
||||
| `apply-edit ──▶ refactor-ports` | depends | The port commands now *push* `workspace/applyEdit` (the protocol's actual mechanism) instead of answering the edit as a result no client applies. `ports::execute`'s signature and behavior unchanged — the only `ports.rs` edit was correcting a now-false doc comment, so this is consumption, not a handshake. |
|
||||
| `references-nav ──▶ refactor-rename` | depends | `find_references` is `Scope::collect_occurrences` lifted out of `collect_edits` — the references list and a rename's touch-set **cannot disagree**, by construction (deliberately not moved to `vlog_semantic`; the walk needs refactor-crate concerns). |
|
||||
| `refactor-rename ◀──▶ workspace-index / lucisv_server` | handshake | `prepareRename` answers from the open `Document` plus index through `prepare_rename_here`; `rename` asks `rename_name_at` for the engine's target and feeds only `Workspace::rename_sources`'s six-rung superset. The rungs cover declarations/members, resolved postings, instantiation edges, macro definitions, every open buffer, and `files_spelling` for unresolved new-name uses; if a rung cannot bound a case it falls back to all sources. Refusal sentences and whole-scope parity are pinned. Open residue: macro-invocation-argument warnings need §2.9-18. |
|
||||
| `refactor-rename ◀──▶ workspace-index / lucisv_server` | handshake | `prepareRename` answers from the open `Document` plus index through `prepare_rename_here`; `rename` asks `rename_name_at` for the engine's target and feeds only `Workspace::rename_sources`'s six-rung superset. The rungs cover declarations/members, resolved postings, instantiation edges, macro definitions, every open buffer, and `files_spelling` for unresolved new-name uses; if a rung cannot bound a case it falls back to all sources. Refusal sentences and whole-scope parity are pinned. Macro-invocation warnings outside the selected source set were delivered by macro-word-census (§2.9-18). |
|
||||
| `file-operations ◀──▶ include-nav / lucisv_server` | handshake | `IncludeGraph::includers` exposes the files that can contain a resolving include; `Workspace::include_sources` overlays open buffers and reads only that set for `willRenameFiles`, instead of the workspace. It is sound only while the graph's held-edge census and `resolve` agree. |
|
||||
|
||||
### 2.7 LSP server lane
|
||||
@@ -566,7 +616,7 @@ update the filing README(s) and this file.
|
||||
| 1 | `lucisv_core::path::normalize` — one `.`/`..` folding instead of three private copies (`filelist::Reader::normalize`, `config::Discovery::absolute`, `includes::normalize`, the last now `pub`) | include-nav; restated by file-operations | lucisv_core |
|
||||
| 2 | A span for `DataType` (and `ExprKind::Cast::ty` tails) — the last thing keeping `vlog_semantic/src/scan.rs` alive | vlog-semantic (item 2); restated by class-semantics | vlog_parser |
|
||||
| ~~3~~ | ~~`fence::scan_nested` has no `ItemKind::Class` arm — formatter fences are inert inside class bodies (the `--fix` backstop still holds; asymmetry errs hands-off)~~ — **delivered 2026-09-02 by statement-fences (TODO §31)**: `scan_nested` enters class bodies, functions, tasks, `always`/`initial`/`final`; statement lists (`begin…end`, `fork…join`, every compound body) are fenceable through `scan_stmt_scope`/`scan_nested_stmt` on the shared `scan_units`; `stmt_docs`/`stmt_seq` obey the two swallowed-unit rules; fence regions merge into `range.rs`'s plan (load-bearing — a fenced statement has no verbatim run behind it). A region opens only at a line start (`opens_line`), so `module m; // lucisv: off` no longer opens one — the rule the format-fences README has stated since round 1. Deferred with reasons: port lists, case-item label lists, same-line fences, `PropSeqDecl.locals`. Opentitan: 4 of its 9 fenced files now keep their fenced bytes. | classes | ~~vlog_formatter (fence.rs)~~ done |
|
||||
| ~~4~~ | ~~A `lint` key in `lucisv.toml` (`[lint.<rule>]` config; selected-rules list) with CLI>config precedence~~ — **delivered 2026-09-02 by semantic-lints-on**: `[lint] select = […] / ignore = […]` in `lucisv.toml` (CLI over config, key by key; unknown rule names fail the run naming the file; `[lint.<rule>]` tables rejected by name — per-rule config stays filed) and `lucisv.lint.select/ignore` settings (registry-validated, republish on change). | linter-core; restated by lint-rules-2, semantic-lints, server-lint | ~~config-discovery / lucisv_core~~ done |
|
||||
| ~~4~~ | ~~A `lint` key in `lucisv.toml` (`[lint.<rule>]` config; selected-rules list) with CLI>config precedence~~ — **delivered 2026-09-02 by semantic-lints-on**: `[lint] select = […] / ignore = […]` in `lucisv.toml` (CLI over config, key by key; unknown rule names fail the run naming the file; `[lint.<rule>]` tables rejected by name — per-rule config was delivered later by linter-expansion-2, v0.38.0; the earlier rejection described here is historical) and `lucisv.lint.select/ignore` settings (registry-validated, republish on change). | linter-core; restated by lint-rules-2, semantic-lints, server-lint | ~~config-discovery / lucisv_core~~ done |
|
||||
| ~~5~~ | ~~`lucisv check --rules-doc` printing `rules_markdown()`~~ — **delivered 2026-09-02 by macro-word-census (TODO §29.3)**: `lucisv check --rules-doc` prints `rules_markdown()` and exits 0, takes no files, is lint-only; the example binary is gone | lint-rules-2 | ~~crates/lucisv~~ done |
|
||||
| ~~6~~ | ~~Workspace-wide "does any file mention this name" query — the precondition for the semantic lints defaulting on~~ — **delivered 2026-09-02 by semantic-lints-on**: `FileFacts::words` (one identifier harvest, `vlog_semantic::words`, lifted from the server's candidates) and `WorkspaceIndex::files_mentioning` / `mentioned_outside(name, own_file)`; `FACTS_FORMAT` 12 → 13. The three rules consult a `MentionOracle` and are on by default whenever one exists. | semantic-lints | ~~vlog_semantic (index)~~ done |
|
||||
| ~~7~~ | ~~`SymbolKind::Interface` (interfaces currently indexed as `Module`; modport/clocking names unbound)~~ — **delivered 2026-09-01 by interface-semantics**: `SymbolKind::{Interface, Modport, Clocking}`, `is_instantiable()` threaded through every Module-exact filter, an interface export rule that treats its signals as its surface, modport/clocking-internal names bound as scope-local references, the modport half of a glued type name bound as `Target::TypeMember`. `program` still indexes as `Module`. Corpus unresolved fell 1 256 → 1 203 | interfaces | ~~vlog_semantic~~ done |
|
||||
@@ -574,9 +624,9 @@ update the filing README(s) and this file.
|
||||
| ~~9~~ | ~~Chasing `InheritedCandidate` through the member tables (in-file and cross-file) + hover for `extends`~~ — **delivered 2026-09-01 by class-member-access**: `resolve::member_in_chain` walks the in-file `extends` chain, `WorkspaceIndex::base_of` + `member_chain` walk it across files (inside `follow_one`, so hover and cross-file references agree), both cycle-guarded; `this.x`/`super.x` misses ride the same loop. `extends` hover/definition on the base name was already answered by overlay-promotion's type-position promotion. Residue filed in TODO §15 round 2: a `base` field on `ReferenceFact` so `this.x` misses get index postings too | class-semantics | ~~vlog_semantic~~ done |
|
||||
| ~~10~~ | ~~`Fmt::raw_text`'s string-crossing path emits a `Doc::Text` carrying newlines~~ — **delivered 2026-08-26 (`53f2269`)**: both `raw_text` and the parameterized-type `#( … )` now emit `Doc::Inline`, whose printer arm resumes measuring from the text's own last line. directive-split's README (QA round 3 note) still documents it as open and should be struck there too | directive-split QA | ~~vlog_formatter~~ done |
|
||||
| 11 | Corpus scripts match `parse error:` / `lex error:` / `verification failed:` textually; a structured `--output-format json` for format mode would remove it | corpus-check | crates/lucisv |
|
||||
| 12 | `vlog_refactor::rename::Scope::build` re-derives sort-and-dedup by hand; could call `index_order` | indexing-ux | vlog_refactor |
|
||||
| 12 | `vlog_refactor::scope::Scope::build` re-derives sort-and-dedup by hand; could call `index_order` | indexing-ux | vlog_refactor |
|
||||
| ~~13~~ | ~~Anonymous-aggregate members (`enum {A,B} x;`) not declared as symbols — hover/definition gap~~ — **delivered 2026-09-01 by struct-members**: anonymous enum variants land in the enclosing scope via the shared `bind_enum_body`; an anonymous `struct {…} s;` declarator and every inline nested struct field carry their own `Struct` child scope, and `member_scope` accepts any symbol whose child scope is a `Struct` scope. Residue filed in the struct-members README: cross-file anonymous struct *variables*, `typeDefinition` inside an anonymous aggregate written as a data declaration | types-decls | ~~vlog_semantic~~ done |
|
||||
| 14 | A `program` node with `name_span`/`end_label_span` (today it lands in `Error`/verbatim), which would let linked-editing serve it with one arm | linked-editing | vlog_parser |
|
||||
| ~~14~~ | ~~A `program` node with `name_span`/`end_label_span` for linked editing~~ — **delivered by vendor-formal-grammar (0.30.0)**: `parser/item.rs` routes `program` to `parse_module("endprogram")`; the resulting `ItemKind::Module` carries both spans and `linked.rs::module_pairs` consumes them. Confirmed in the 2026-09-04 source audit. | linked-editing | ~~vlog_parser~~ done |
|
||||
| ~~15~~ | ~~Bind semantics: whether a `bind`'s target scope and connections should resolve through the workspace index (today only the instantiated module name is recorded)~~ — **delivered 2026-09-02 by bind-semantics**: `BindDirective::target` is `Vec<PathSegment { name, span, index }>`; a lone target binds as `Target::Module`, an instance path records nothing (a guess would be a wrong answer); each connection's port half is `Target::Port(inst.module)` and its expression half `Target::BindScope` — the target's own scope first (`resolve::in_bind_target`, `None` on a miss because generate blocks open scopes of their own), the workspace's one-segment member path when the target lives elsewhere, the writing scope last. `FACTS_FORMAT` 14 → 15 | bind | ~~vlog_semantic~~ done |
|
||||
| 16 | DPI/package re-export halves as real references (`export pkg::item` doesn't resolve; `*::*` has `"*"` as its package name, which nothing expects) | dpi-export | vlog_semantic |
|
||||
| 17 | Inline aggregate as a parameter-override *argument* (`m #(.T(struct packed { logic a; })) u ();`) is rejected in expression position; M4's `instantiation_plan` drops such a `parameter type` default rather than emit unparseable text | refactor-instantiate (gap 1; its gap 2 was delivered by ansi-first-port) | vlog_parser |
|
||||
@@ -589,6 +639,10 @@ update the filing README(s) and this file.
|
||||
| ~~24~~ | ~~A **half-typed `#(` parameter override whose value can read as a call** (`sub #(.W(` ⏎ `u0 (.a(x))`) — the greedy expression grammar swallows the next instance's name before any error fires, so the whole instantiation still degrades to an item-level `Error` node instead of getting header recovery's benefit. Found by §32's QA; the fix is a lookahead in the override grammar (an identifier followed by `(` on a later line is the next instance, not a call).~~ — **delivered 2026-09-04 by small-items-3 (TODO §36)** | header-recovery (QA) | vlog_parser |
|
||||
| ~~25~~ | ~~The parser **refuses** a module-scope `begin … end` and a bare `begin` inside a `generate` region (an `ItemKind::Error`) rather than recovering them as an unnamed generate block, so `module-begin-block` and `v2001-generate-begin` (TODO §35) fire on an error leaf and the rest of the unit is lost to recovery. Wanted: tolerant-mode recovery that keeps the block's items.~~ — **delivered 2026-09-04 by small-items-3 (TODO §36)** | linter-expansion-3 (dev) | vlog_parser |
|
||||
|
||||
| 26 | **Same-target atomic writers share a temp path.** `atomic::temp_path` uses canonical target + process ID; parallel workers following distinct symlink spellings can reach that same name, while CLI dedup is lexical. A bounded direct helper probe (100 rounds, two threads, 1 MiB each) returned 100 write errors in 200 calls; no mixed final bytes observed in that probe. Use exclusive per-operation temp creation and coordinate/deduplicate target writes. See repository-analysis.md for limits. | repository audit, 2026-09-04 | lucisv_core / lucisv |
|
||||
| 27 | **Net-delay comment slot**: parser-skips records a pre-existing refusal for a comment immediately before `#` in a net declaration. The regression cases mark it `#SKIP`; preserve the verifier's rejection until a parser/formatter comment slot handles it. | parser-skips (dev + QA) | vlog_parser / vlog_formatter |
|
||||
| 28 | **Project lint selection is not consumed by the server.** `enabled_rules` reads `ClientSettings`; `configured` reads project rule options and line length only. `[lint] select/ignore` currently controls CLI runs, while the editor needs `lucisv.lint.select/ignore`. Decide and test a common precedence contract before claiming project-wide parity. | repository audit, 2026-09-04 | lucisv_server |
|
||||
|
||||
---
|
||||
|
||||
## 3. Combined graph — features mapped onto modules
|
||||
@@ -598,8 +652,9 @@ update the filing README(s) and this file.
|
||||
Where a feature's code chiefly lives (its README remains the authority on
|
||||
exact file scope). Cross-module touches are recorded per-feature in §2 and in
|
||||
each feature README's Handshakes; this matrix names only the primary home.
|
||||
The newer features and their complete cross-crate touch sets are in §1.4.
|
||||
Grammar-lane features (*italicized*) routinely add exhaustive-match arms in
|
||||
other crates — see §3.3's `ast.rs` row — though not always a formatter arm:
|
||||
other crates — see §3.3's `ast/` row — though not always a formatter arm:
|
||||
directive-split and ansi-first-port shipped with `vlog_formatter/src`
|
||||
untouched, reusing existing arms.
|
||||
|
||||
@@ -607,7 +662,7 @@ untouched, reusing existing arms.
|
||||
|---|---|
|
||||
| `vlog_parser` | spans, name-spans, recursion-limit, error-recovery, define-table, lexer-cleanup, decomposition-parser, and the grammar lane: *macro-items*, *classes*, *bind*, *dynamic-types*, *types-decls*, *item-misc*, *directives-in-lists*, *directives-in-instances*, *dpi-export*, *assertions*, *interfaces*, *expressions-2*, *dv-statements*, *mop-up-2*, *directive-split*, *ansi-first-port*, *null-items*, *constraint-bodies*, *covergroup-bodies*, *fragment-mode*, *vendor-formal-grammar*, *comment-slots*, *bind-semantics*, *sva-bodies* (most also add formatter arms — parser+formatter pairs by default; directive-split and ansi-first-port reused existing arms and left `vlog_formatter/src` untouched) |
|
||||
| `vlog_formatter` | safety-net (`verify.rs`), case-tables, formatter-bug-fixes, corpus-bugs, comments-round, comments-round-2, alignment (`align.rs`), format-fences (`fence.rs`), range-formatting (`range.rs`), shared-fence-filter, decomposition-formatter, and the layout halves of constraint-bodies, covergroup-bodies, comment-slots, bind-semantics and sva-bodies (`format/`) |
|
||||
| `vlog_semantic` | vlog-semantic (`bind/`, `resolve.rs`, `model.rs`), workspace-index (`workspace/`), decomposition-semantic, class-semantics, interface-semantics, class-member-access, struct-members, overlay-promotion, port-detail-spans (`Symbol`/`Def::detail_span` and `Semantics::symbols_named`), hover-line-index (`DeclLines`, facts codec), vscode-hierarchy-sidebar's declaration/instance positions, scan-interleave (`WorkspaceIndex::absorb`), semantic-lints-on's word census, bind-semantics and sva-bodies, refactor-rename's performance amendment (`files_spelling`), plus the index halves of indexing-ux (`index_order`/`IndexBuilder`), index-scope (order-insensitive `finish`, facts-from-analysis), incremental-index (`update_file`, edge/reference tables, `instantiations.rs`, `classes.rs`), index-persistence (`facts.rs`; current `FACTS_FORMAT` 16; plus a small `vlog_parser::defines` touch — `DefineTable::from_entries`, `Eq` derives) |
|
||||
| `vlog_semantic` | vlog-semantic (`bind/`, `resolve.rs`, `model.rs`), workspace-index (`workspace/`), decomposition-semantic, class-semantics, interface-semantics, class-member-access, struct-members, overlay-promotion, port-detail-spans (`Symbol`/`Def::detail_span` and `Semantics::symbols_named`), hover-line-index (`DeclLines`, facts codec), vscode-hierarchy-sidebar's declaration/instance positions, scan-interleave (`WorkspaceIndex::absorb`), semantic-lints-on's word census, bind-semantics and sva-bodies, refactor-rename's performance amendment (`files_spelling`), plus the index halves of indexing-ux (`index_order`/`IndexBuilder`), index-scope (order-insensitive `finish`, facts-from-analysis), incremental-index (`update_file`, edge/reference tables, `instantiations.rs`, `classes.rs`), index-persistence (`facts.rs`; current `FACTS_FORMAT` 17; plus a small `vlog_parser::defines` touch — `DefineTable::from_entries`, `Eq` derives) |
|
||||
| `vlog_linter` | linter-core, lint-harness, lint-rules-2, semantic-lints (`signals.rs`), semantic-lints-on (workspace oracle), one-parse (`context.rs`) |
|
||||
| `vlog_refactor` | refactor (plan), refactor-rename (including `prepare_rename_here` / `rename_name_at` selector half), refactor-ports (including module-target selectors), refactor-instantiate, references-nav (whole-scope equivalence oracle), and the refactor half of decomposition-semantic |
|
||||
| `lucisv_core` | lucisv-core-lift (`config.rs`, `walk.rs`), filelist (`filelist.rs`), format-cache (`cache.rs`) |
|
||||
@@ -642,7 +697,7 @@ graph TD
|
||||
clif[cli lane features]
|
||||
end
|
||||
subgraph srv [lucisv_server]
|
||||
caps[capability features (~30)]
|
||||
caps[capability handlers]
|
||||
end
|
||||
subgraph ed [editors/vscode + tools/CI]
|
||||
pkg[packaging lane]
|
||||
@@ -670,7 +725,7 @@ graph TD
|
||||
|
||||
Reading it feature-side: a grammar feature is by default a
|
||||
**parser+formatter pair** (new AST + its layout, plus minimal arms in
|
||||
`bind.rs`/`spans.rs`) — though one that reuses an existing arm ships with the
|
||||
`bind/`/`tests/spans.rs`) — though one that reuses an existing arm ships with the
|
||||
formatter untouched (directive-split, ansi-first-port); an index feature is a
|
||||
**vlog_semantic + lucisv_server pair** (the data structure and the
|
||||
events/settings around it); a capability feature is usually **server-only
|
||||
@@ -692,13 +747,13 @@ ownership explicitly.
|
||||
| choke point | owner (feature) | consumers | the rule |
|
||||
|---|---|---|---|
|
||||
| `vlog_parser/src/ast/` | the grammar lane collectively | formatter, semantic, linter, refactor, server, `tests/spans.rs` | A new variant costs, at minimum: a `format/` arm, a `bind/` arm, a `spans.rs` arm. `visit.rs` is catch-all for compilation only — a variant containing items/statements still needs an arm there or AST lint rules never see inside it. Prefer **additive fields / parallel vectors** over changing vector element types — that is why `ListDirective` sits beside the lists instead of inside them (two rounds chose it independently for blast-radius reasons). |
|
||||
| `vlog_formatter/src/verify.rs` | safety-net | every formatter feature; the CLI's exit-2 promise | CLAUDE.md invariant #4. Never widen a normalization without masked-corruption attack tests; the standing pattern is "untouched + rejection tests anyway". The single widening in history is macro-items' backtick-`Ident` arm in `normalize` — which produced lucisv's one real corruption; its repair, `trim_lines_outside_strings`, is a *narrowing*, and the pattern to copy: the widening shipped without attack tests, the fix shipped with them. `line_starts_inside_string` is the one definition of "which line breaks are data" — both `format.rs` and `verify.rs` must read it. |
|
||||
| `vlog_formatter/src/fence.rs` | format-fences | range-formatting, shared-fence-filter, CLI `--fix` (`lucisv/src/lint.rs`), server quick fixes (`lucisv_server/src/lint.rs`) | `protected_regions`/`is_protected` are the **only** supported way to ask "may an automatic edit touch these bytes". One answer, **two** front ends — and `vlog_linter` is deliberately not one of them (it stays fence-blind; the filter lives in each front end). Open gap: no `Class` arm in `scan_nested` (§2.9-3). |
|
||||
| `vlog_formatter/src/verify.rs` | safety-net | every formatter feature; the CLI's exit-2 promise | CLAUDE.md invariant #4. Never widen a normalization without masked-corruption attack tests; the standing pattern is "untouched + rejection tests anyway". The single widening in history is macro-items' backtick-`Ident` arm in `normalize` — which produced lucisv's one real corruption; its repair, `trim_lines_outside_strings`, is a *narrowing*, and the pattern to copy: the widening shipped without attack tests, the fix shipped with them. `line_starts_inside_string` is the one definition of "which line breaks are data" — both `format/` and `verify.rs` must read it. |
|
||||
| `vlog_formatter/src/fence.rs` | format-fences | range-formatting, shared-fence-filter, CLI `--fix` (`lucisv/src/lint.rs`), server quick fixes (`lucisv_server/src/lint.rs`) | `protected_regions`/`is_protected` are the **only** supported way to ask "may an automatic edit touch these bytes". One answer, **two** front ends — and `vlog_linter` is deliberately not one of them (it stays fence-blind; the filter lives in each front end). Class and statement scopes are supported by statement-fences (§2.9-3 delivered); `range::plan` must merge these protected spans with unselected runs. Port and case-label lists remain outside independent fence scopes. |
|
||||
| `lucisv_server/src/pairs.rs` | editor-scopes | documentHighlight, missing-closer diagnostics, scopePairs rainbow, folding, completion gates, on-type indent, inline-templates, expand-selection (`selection.rs`) | The `RULES` table + no-closer guard list is shared truth. Any keyword added to/removed from `token.rs` requires re-checking it (a word that stops being a keyword silently stops being matched). |
|
||||
| `lucisv_server/src/server/` | lucisv-server; amended by cancel-request, change-debounce, scan-interleave, index-scope, verbose-timing | every request/notification and every rebuild trigger | One ordered loop owns all mutable server state. A startup scan may publish a prefix and answer queued work between files; a request queued behind a rescan trigger is held until that rescan lands, and its cancel travels with it. Never make the distinction time-based: machine load must not change which index a request sees. Verbose timing may observe each wrapper/lifecycle but must be entirely silent when off and must not move protocol ordering. The queue thread only forwards protocol messages and must never parse. |
|
||||
| `lucisv_server/src/state.rs` | lucisv-server; amended by filelist, index-scope, scan-interleave, indexing-ux, incremental-index, index-persistence, hover-line-index, large-file-mode, one-parse (`Document.tree`), editor-settings + folders-and-config (`set_client_settings`/`change_roots`), include-nav (the include graph), completion-core (candidates), file-watching, interactive-latency (`first_token_reaching`/`first_token_from`), refactor performance fan-outs | every handler | `Workspace` is immutable through request handlers except the interior-mutable four-entry/8 MiB `FileView` cache. The scope ladder (filelist > `index.scope: "workspace"` > folder-scope at shipped depth 2; a rootless session never climbs and always reads its own directory flat) and open-buffer overlay are contracts. `Scan` has whole/widen shapes but one step/finish path; index/candidate/include prefixes publish together. `module_sources`, `rename_sources`, and `include_sources` must remain supersets of what their engines can edit/refuse over; `rename_sources` falls back to `sources()` when an ambiguous posting prevents a proven bound. `update_one` and a completed scan must equal a fresh build (`fingerprint`). Handlers reading `doc.text` instead of tokens/tree must check `doc.large`. |
|
||||
| `lucisv_server/src/state.rs` | lucisv-server; amended by filelist, index-scope, scan-interleave, indexing-ux, incremental-index, index-persistence, hover-line-index, large-file-mode, one-parse (`Document.tree`), editor-settings + folders-and-config (`set_client_settings`/`change_roots`), include-nav (the include graph), completion-core (candidates), file-watching, interactive-latency (`first_token_reaching`/`first_token_from`), refactor performance fan-outs | every handler | `Workspace` is immutable through request handlers except the interior-mutable four-entry/8 MiB `FileView` cache. The scope ladder (filelist > `index.scope: "workspace"` > folder-scope at shipped depth 2; a rootless session never climbs; it reads flat at depth 0 and walks descendants at positive depth (including the default 2)) and open-buffer overlay are contracts. `Scan` has whole/widen shapes but one step/finish path; index/candidate/include prefixes publish together. `module_sources`, `rename_sources`, and `include_sources` must remain supersets of what their engines can edit/refuse over; `rename_sources` falls back to `sources()` when an ambiguous posting prevents a proven bound. `update_one` and a completed scan must equal a fresh build (`fingerprint`). Handlers reading `doc.text` instead of tokens/tree must check `doc.large`. |
|
||||
| `lucisv_server/src/settings.rs` | editor-settings | folders-and-config, indexing-ux, index-scope, index-persistence, inline-templates, will-save-wait-until, filelist, large-file-mode | One parser for both doors (push and pull, via `from_section` re-wrapping). Every key drops garbage independently; defaults that are not "silence" (1 MiB cap, log on, persist on, 4 MiB large-file threshold) are hand-written in `Default`. `set_client_settings` returns whether a reindex is owed — new keys must decide that question explicitly. |
|
||||
| `vlog_semantic/src/workspace/` (+ `facts.rs`) | workspace-index; extended by incremental-index, index-persistence, index-scope, hover-line-index, scan-interleave, member semantics, semantic-lints-on, bind-semantics, SVA bodies and refactor-rename performance | server state, hierarchy/lens/type-hierarchy, refactor, completion, semantic lints | Determinism (same inputs → same index, any order), the `paths` spelling coupling with `resolve.rs`, `FACTS_FORMAT` bumped on any codec change (currently 16), edge/posting tables built by the same lifted walks the engines use. `DeclLines` must round-trip and participate in `fingerprint`; `absorb` must equal one build over the resulting record set; `files_spelling` must continue to include unresolved non-empty external/inherited paths or rename loses its dangling-use refusal; `FileFacts::words` is the shared project mention/completion census. |
|
||||
| `vlog_semantic/src/workspace/` (+ `facts.rs`) | workspace-index; extended by incremental-index, index-persistence, index-scope, hover-line-index, scan-interleave, member semantics, semantic-lints-on, bind-semantics, SVA bodies and refactor-rename performance | server state, hierarchy/lens/type-hierarchy, refactor, completion, semantic lints | Determinism (same inputs → same index, any order), the `paths` spelling coupling with `resolve.rs`, `FACTS_FORMAT` bumped on any codec change (currently 17), edge/posting tables built by the same lifted walks the engines use. `DeclLines` must round-trip and participate in `fingerprint`; `absorb` must equal one build over the resulting record set; `files_spelling` must continue to include unresolved non-empty external/inherited paths or rename loses its dangling-use refusal; `FileFacts::words` is the shared project mention/completion census. |
|
||||
| `vlog_refactor/src/rename/` | refactor-rename; shared by references-nav and the performance wave | server rename/prepareRename/references and port refactor verification | `Scope` remains the whole-scope authority and `collect_occurrences` the one rename/references walk. The fast `prepare_rename_here` answer/refusal and `rename_name_at` target are parity contracts, not alternate semantics. Any new refusal must be expressible on the fast path or force a deferral; any new occurrence shape must be reflected in the server fan-out or trigger its all-sources fallback. |
|
||||
| `vlog_parser/src/token.rs` keyword table | completion-core (`KEYWORDS` export) | lexer, pairs.rs, editor grammar (test-locked), completion | Adding a keyword = lexer change + `pairs.rs` re-check + a hand edit to the grammar (`tests/grammar.rs` names the missing word) + potentially `verify.rs`-adjacent behavior. dv-statements added `randcase`/`let` to `is_keyword` and recorded it as shared with the adjacent lexer-cleanup round — the precedent for treating this file as coordinated even between back-to-back rounds. |
|
||||
| `editors/vscode/package.json` | editor-packaging | editor-settings, editor-scopes (colour ids), editor-snippets, index-persistence, verbose-timing, platform-vsix, marketplace-page | Settings/colour/snippet ids referenced from `extension.js` or the server must move in lockstep; mismatches are *silent* (VS Code ignores unknown ids). `lucisv.verbose` is special: it changes a spawn argument and therefore restarts the server instead of flowing through the ordinary settings push. Version number is one of the four version files. |
|
||||
@@ -711,7 +766,7 @@ ownership explicitly.
|
||||
parallelism. Two features in one lane usually share a choke point (§3.3);
|
||||
check before spawning both.
|
||||
2. **A grammar feature is a pair by default** (parser + formatter arms +
|
||||
minimal `bind.rs`/`spans.rs` arms) — unless it reuses an existing arm, as
|
||||
minimal `bind/`/`tests/spans.rs` arms) — unless it reuses an existing arm, as
|
||||
the verbatim producers and ansi-first-port did. Say which arms you owe in
|
||||
the feature scope up front; the compile-fix arms in other crates are
|
||||
legitimate and should be listed in Handshakes, per the established
|
||||
|
||||
Reference in new issue
Block a user