diff --git a/README.md b/README.md index 5322095..ed0f8a5 100644 --- a/README.md +++ b/README.md @@ -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.]`, 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 diff --git a/docs/coverage_gaps.md b/docs/coverage_gaps.md index a750b57..99932f5 100644 --- a/docs/coverage_gaps.md +++ b/docs/coverage_gaps.md @@ -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 diff --git a/docs/repository-analysis.md b/docs/repository-analysis.md new file mode 100644 index 0000000..49e1d48 --- /dev/null +++ b/docs/repository-analysis.md @@ -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. diff --git a/docs/site/README.md b/docs/site/README.md index 00ec888..2fba311 100644 --- a/docs/site/README.md +++ b/docs/site/README.md @@ -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. diff --git a/docs/site/astro.config.mjs b/docs/site/astro.config.mjs index 7b305db..3a05e1f 100644 --- a/docs/site/astro.config.mjs +++ b/docs/site/astro.config.mjs @@ -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' diff --git a/docs/site/dist/404.html b/docs/site/dist/404.html index 2d52b95..c36c372 100644 --- a/docs/site/dist/404.html +++ b/docs/site/dist/404.html @@ -1,4 +1,4 @@ -404 | lucisv
// verilog_format: off
localparam int A = 1;
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

Section titled “Range formatting”

--lines selects 1-based inclusive ranges:

Terminal window
lucisv --lines 120-134 rtl/alu.sv
lucisv --lines 3-9,40 --check rtl/alu.sv
@@ -94,7 +98,7 @@

Safety invariants

Section titled “Safety invariants”
  1. Parse first. Whole-file formatting produces no output for a file that cannot be fully parsed.
  2. -
  3. Preserve meaning. Verification compares normalized syntax before accepting output.
  4. +
  5. Preserve meaning. Verification re-lexes input and output and compares normalized tokens, including comments; it does not elaborate the design.
  6. Converge. Formatting twice reaches the same fixed point.
  7. Write atomically. An error leaves the affected file untouched.
  8. Stay deterministic. Parallel worker count changes performance, never output order or exit status.
  9. diff --git a/docs/site/dist/guides/linter/index.html b/docs/site/dist/guides/linter/index.html index 9da4df2..6f3dd50 100644 --- a/docs/site/dist/guides/linter/index.html +++ b/docs/site/dist/guides/linter/index.html @@ -1,4 +1,4 @@ -Linter | lucisv

    Linter

    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.

    +

    Linter

    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.

    Terminal window
    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/
    -

    --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 --selected.

    -

    --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.

    -

    Fixes are sorted, overlap-checked, and never applied inside format-fenced regions.

    +

    --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 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.

    + +

    Use [lint.<rule>] in lucisv.toml or lucisv.lint.options in the editor for +per-rule options. See 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.

    wire a; // lucisv: waive no-tabs
    // lucisv: waive no-tabs
    wire b;
    // lucisv: waive-start module-name-style
    module LegacyName;
    endmodule
    // lucisv: waive-stop module-name-style

    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.

    \ No newline at end of file diff --git a/docs/site/dist/guides/syntax/index.html b/docs/site/dist/guides/syntax/index.html index 1da5dc0..7b2ffd1 100644 --- a/docs/site/dist/guides/syntax/index.html +++ b/docs/site/dist/guides/syntax/index.html @@ -1,4 +1,4 @@ -Supported syntax | lucisv

    SystemVerilog, understood.

    Format, lint, navigate, and refactor RTL with one fast engine—at your cursor and in CI.
    lucisv language server

    Real RTL. Real project context.

    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.

    HoverCompletionGo to definitionRenameHierarchyDiagnostics
    OpenTitan SystemVerilog source open in Visual Studio Code with lucisv port hover information and project diagnostics
    01Semantic hoverPort type at the cursor02Project diagnosticsRules across the workspace03Design-aware navigationSymbols, modules, and instances04OpenTitan scaleReal-world SystemVerilog
    99.3%measured corpus parse rate
    17built-in lint rules
    2portable binaries
    0runtime dependencies

    Formatting, diagnostics, and code intelligence share one parser and one semantic model. The answer in CI is the answer at your cursor.

    -
    Same engine, anywhere

    Editor-fast. CI-certain.

    Use lucisv-server from any LSP client, then enforce the exact same formatting and diagnostics with the standalone CLI.

    Set up your editor →
    $ lucisv –check rtl/
    ✓ 184 files already formatted

    $ lucisv check rtl/
    ✓ no diagnostics · 0.42s
    \ No newline at end of file +
    Same engine, anywhere

    Editor-fast. CI-certain.

    Use lucisv-server from any LSP client, then enforce the exact same formatting and diagnostics with the standalone CLI.

    Set up your editor →
    $ lucisv –check rtl/
    ✓ 184 files already formatted

    $ lucisv check rtl/
    ✓ no diagnostics · 0.42s
    \ No newline at end of file diff --git a/docs/site/dist/pagefind/fragment/en_13d9741.pf_fragment b/docs/site/dist/pagefind/fragment/en_13d9741.pf_fragment new file mode 100644 index 0000000..5e6dca7 Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_13d9741.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_1d77e98.pf_fragment b/docs/site/dist/pagefind/fragment/en_1d77e98.pf_fragment new file mode 100644 index 0000000..889367a Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_1d77e98.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_25b4f99.pf_fragment b/docs/site/dist/pagefind/fragment/en_25b4f99.pf_fragment new file mode 100644 index 0000000..573e0ef Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_25b4f99.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_2a84712.pf_fragment b/docs/site/dist/pagefind/fragment/en_2a84712.pf_fragment deleted file mode 100644 index 78c10a4..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_2a84712.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/fragment/en_389ebf3.pf_fragment b/docs/site/dist/pagefind/fragment/en_389ebf3.pf_fragment new file mode 100644 index 0000000..067b0bb Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_389ebf3.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_4bf8b4a.pf_fragment b/docs/site/dist/pagefind/fragment/en_4bf8b4a.pf_fragment new file mode 100644 index 0000000..820e6f9 Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_4bf8b4a.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_5219892.pf_fragment b/docs/site/dist/pagefind/fragment/en_5219892.pf_fragment deleted file mode 100644 index 76bcf07..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_5219892.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/fragment/en_86cb946.pf_fragment b/docs/site/dist/pagefind/fragment/en_86cb946.pf_fragment new file mode 100644 index 0000000..bdb23b6 Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_86cb946.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_8a1d14e.pf_fragment b/docs/site/dist/pagefind/fragment/en_8a1d14e.pf_fragment deleted file mode 100644 index 9572976..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_8a1d14e.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/fragment/en_a425f62.pf_fragment b/docs/site/dist/pagefind/fragment/en_a425f62.pf_fragment deleted file mode 100644 index 2b93faf..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_a425f62.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/fragment/en_b9fbaa2.pf_fragment b/docs/site/dist/pagefind/fragment/en_b9fbaa2.pf_fragment deleted file mode 100644 index 3cd4b08..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_b9fbaa2.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/fragment/en_ce8ecef.pf_fragment b/docs/site/dist/pagefind/fragment/en_ce8ecef.pf_fragment deleted file mode 100644 index 4235bbf..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_ce8ecef.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/fragment/en_d952f62.pf_fragment b/docs/site/dist/pagefind/fragment/en_d952f62.pf_fragment new file mode 100644 index 0000000..56fe150 Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_d952f62.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_ee3ffec.pf_fragment b/docs/site/dist/pagefind/fragment/en_ee3ffec.pf_fragment new file mode 100644 index 0000000..d29b264 Binary files /dev/null and b/docs/site/dist/pagefind/fragment/en_ee3ffec.pf_fragment differ diff --git a/docs/site/dist/pagefind/fragment/en_f11b508.pf_fragment b/docs/site/dist/pagefind/fragment/en_f11b508.pf_fragment deleted file mode 100644 index 48e6e26..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_f11b508.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/fragment/en_fea9c38.pf_fragment b/docs/site/dist/pagefind/fragment/en_fea9c38.pf_fragment deleted file mode 100644 index 416c49e..0000000 Binary files a/docs/site/dist/pagefind/fragment/en_fea9c38.pf_fragment and /dev/null differ diff --git a/docs/site/dist/pagefind/index/en_ca54f14.pf_index b/docs/site/dist/pagefind/index/en_ca54f14.pf_index new file mode 100644 index 0000000..64682b7 Binary files /dev/null and b/docs/site/dist/pagefind/index/en_ca54f14.pf_index differ diff --git a/docs/site/dist/pagefind/index/en_d012a2c.pf_index b/docs/site/dist/pagefind/index/en_d012a2c.pf_index deleted file mode 100644 index a92a207..0000000 Binary files a/docs/site/dist/pagefind/index/en_d012a2c.pf_index and /dev/null differ diff --git a/docs/site/dist/pagefind/index/en_f8a7a64.pf_index b/docs/site/dist/pagefind/index/en_f8a7a64.pf_index new file mode 100644 index 0000000..47508fb Binary files /dev/null and b/docs/site/dist/pagefind/index/en_f8a7a64.pf_index differ diff --git a/docs/site/dist/pagefind/pagefind-entry.json b/docs/site/dist/pagefind/pagefind-entry.json index b6fec30..ce615bc 100644 --- a/docs/site/dist/pagefind/pagefind-entry.json +++ b/docs/site/dist/pagefind/pagefind-entry.json @@ -1 +1 @@ -{"version":"1.5.2","languages":{"en":{"hash":"en_be5ced3c43","wasm":"en","page_count":12}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]} \ No newline at end of file +{"version":"1.5.2","languages":{"en":{"hash":"en_db82295a7c","wasm":"en","page_count":12}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]} \ No newline at end of file diff --git a/docs/site/dist/pagefind/pagefind.en_be5ced3c43.pf_meta b/docs/site/dist/pagefind/pagefind.en_be5ced3c43.pf_meta deleted file mode 100644 index 97726d0..0000000 Binary files a/docs/site/dist/pagefind/pagefind.en_be5ced3c43.pf_meta and /dev/null differ diff --git a/docs/site/dist/pagefind/pagefind.en_db82295a7c.pf_meta b/docs/site/dist/pagefind/pagefind.en_db82295a7c.pf_meta new file mode 100644 index 0000000..4072f97 Binary files /dev/null and b/docs/site/dist/pagefind/pagefind.en_db82295a7c.pf_meta differ diff --git a/docs/site/dist/reference/architecture/index.html b/docs/site/dist/reference/architecture/index.html index be2e363..65ce4a2 100644 --- a/docs/site/dist/reference/architecture/index.html +++ b/docs/site/dist/reference/architecture/index.html @@ -1,4 +1,4 @@ -Architecture | lucisv

    Architecture

    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.

    +

    Architecture

    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.

    @@ -107,12 +107,12 @@ - + - + @@ -134,15 +134,45 @@
    refactorPlans and non-overlapping workspace edits.
    LSPQueries, diagnostics, navigation, UI actions.
    + +
      +
    • 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/.

    • 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.
    -

    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.

    \ No newline at end of file diff --git a/docs/site/dist/reference/cli/index.html b/docs/site/dist/reference/cli/index.html index 9c20a7d..1e99914 100644 --- a/docs/site/dist/reference/cli/index.html +++ b/docs/site/dist/reference/cli/index.html @@ -1,4 +1,4 @@ -CLI reference | lucisv

    Lint rules

    17 rules indexed

    +

    Lint rules

    73 rules indexed

    +

    Every rule is in one of three severity classes. error is code that would very likely fail to compile, elaborate or synthesize; warning is code that compiles and very likely does not mean what it says; style is code that is correct and reads badly. The class is the word in the CLI diagnostic line (FILE:LINE:COL: warning: …), the severity field of --output-format json, and the colour of the editor’s squiggle — and it is accepted wherever a rule name is, so --ignore style and --select error both work.

    +

    Every error-class rule is held to one discipline: it goes silent whenever the run cannot answer — 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 `included. A wrong accusation in that class is worse than a hundred missed ones.

    +

    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. Invalid editor option settings are logged and dropped; invalid project-file option entries are currently dropped silently by server linting.

    +
    [lint.line-length]
    length = 120
    +
    [lint.typedef-structs-unions]
    allow_anonymous_nested = true

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

    lucisv_coreconfiguration, filelists, walking, exclusions, cacheconfiguration, filelists, walking, exclusions, cache, atomic replacement CLI and language server
    lucisvargument parsing, parallel processing, output, atomic writesargument parsing, parallel per-file processing, reports, write orchestration command-line users and CI
    + @@ -83,107 +90,516 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RuleSeverity Default Fix Purpose
    always-combstyleonunsafeWrite always_comb, not always @*
    banned-declared-name-patternsstyleoff—Ban the names your project has decided against
    constraint-name-stylestyleon—Name constraints lower_snake_case ending _c
    explicit-beginstyleoffsafeWrap every body in begin ... end
    forbid-consecutive-null-statementsstyleonsafeDrop a ; that follows a ;
    generate-labelstyleon—Label every generate block
    generate-label-prefixstyleon—Prefix that label g_ or gen_
    interface-name-stylestyleon—Name interfaces lower_snake_case ending _if
    line-lengthstyleon—Keep lines within the configured width
    macro-name-stylestyleon—Name macros ALL_CAPS
    one-module-per-filestyleoff—Declare one module per file
    package-filenamestyleon—Match one-package files to package names
    parameter-type-name-stylestyleoff—Name type parameters lower_snake_case ending _t
    port-name-suffixstyleoff—Say a port’s direction in its name
    posix-eofstyleonsafeEnd the file with a newline
    signal-name-stylestyleoff—Name signals lower_snake_case
    typedef-enumsstyleon—Name an enum type with a typedef
    typedef-structs-unionsstyleon—Name a struct/union type with a typedef
    always-comb-blockingwarning on — Use = inside always_comb
    always-ff-non-blockingwarning on — Use <= inside always_ff
    case-missing-defaultwarning on — Give every case a default branch
    duplicate-declarationerroron—Declare each name once per scope
    empty-itemstyle on safe Drop a ; that stands where an item belongs
    enum-name-stylestyle on — Name enum typedefs with _e or _t
    explicit-function-task-parameter-typewarningon—Type every function and task argument
    explicit-parameter-storage-typestyle on — Declare parameter storage types
    forbid-defparamwarningon—Override at the instantiation, not with defparam
    forbid-negative-array-dimwarningon—Keep negative literals out of dimensions
    incomplete-assignmentwarningon—Assign on every path of an always_comb
    instance-shadowingwarningon—Do not hide an enclosing declaration
    invalid-system-task-functionwarningon—Avoid deprecated and non-reproducible system tasks
    mismatched-labelserroron—Make an end label name its own block
    module-filenamestyle on — Match one-module files to module names
    module-name-stylestyle off — Use lower_snake_case module names
    module-parameterwarningon—Override more than one parameter by name
    module-portwarningon—Connect more than one port by name
    multiply-drivenerror on (project) — Give variables one driver
    no-tabsstyle on safe Use spaces outside string literals
    no-trailing-whitespacestyle on safe Remove end-of-line whitespace
    packed-dimensions-range-orderingwarningon—Write a packed dimension [N-1:0]
    parameter-name-stylestyle on — Use CamelCase or ALL_CAPS parameters
    plusarg-assignmentwarningon—Read a plusarg with $value$plusargs
    struct-union-name-stylestyle on — Name aggregate typedefs with _t
    suspicious-semicolonwarningon—No if (x); or while (x);
    truncated-numeric-literalwarningon—Keep a sized literal inside its width
    undeclared-identifiererroron (project)—Use a name something declares
    undersized-binary-literalwarningonsafeWrite every bit of a sized binary literal
    undriven-netwarning on (project) — Drive signals that are read
    unknown-parametererroron (project)—Override only parameters the module declares
    unknown-porterroron (project)—Connect only ports the module declares
    unused-signalwarning on (project) — Detect unreferenced internal signals
    unused-waiverstyle on — Remove ineffective suppressions
    void-castwarningon—Cast to void only what a call returns
    wire-reg-mixuperror on — Prefer logic to reg in SystemVerilog
    create-object-name-matchwarningon—Name a type_id::create after its handle
    dff-name-stylestyleoff—Name a flip-flop _q and its input _d
    disable-statementwarningoff—Write disable fork, not a fork label
    endif-commentstyleoffsafeSay what an `endif closes
    explicit-function-lifetimestyleon—State a function’s lifetime outside a class
    explicit-task-lifetimestyleon—State a task’s lifetime outside a class
    forbid-line-continuationsstyleon—Do not break a string with a backslash
    forbidden-macrowarningon—Ban the macros your project has decided against
    legacy-generate-regionstyleoff—Drop the generate … endgenerate wrapper
    legacy-genvar-declarationstyleoff—Declare a genvar in the for header
    macro-string-concatenationwarningoff—Do not put `` in a plain string
    module-begin-blockstyleon—No begin/end at module scope
    numeric-format-string-stylestyleoff—Match a radix prefix to its specifier
    positive-meaning-parameter-namestyleon—Name a parameter for what it enables
    proper-parameter-declarationstyleoff—parameter in a header, localparam in a body
    suggest-parenthesesstyleonsafeParenthesize a conditional inside a conditional
    unpacked-dimensions-range-orderingstyleon—Write an unpacked dimension [0:N-1]
    uvm-macro-semicolonwarningoff—No ; after a `uvm_* macro
    v2001-generate-beginstyleon—No bare begin in a generate region
    @@ -220,4 +636,116 @@

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

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

    -
    \ No newline at end of file + +

    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 port 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 name range (Gpr[0:2] declares a run of members under one written identifier), a generate 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.

    + +

    Reports a task or function formal with no storage type, which the language makes a one-bit logic (IEEE 1800 §13.3). Only the argument that opens a declaration is judged — a continuation (f(input int a, b)) inherits — and a DPI import’s unnamed formal is not this rule’s subject. Verible’s explicit-function-task-parameter-type, same default.

    + +

    Reports defparam, deprecated since IEEE 1800-2009 and rejected outright by several synthesis tools. The #(.NAME(value)) override at the instantiation says the same thing where the instance is. Verible’s forbid-defparam, same default.

    + +

    Reports a written negative literal inside a dimension, packed or unpacked — the shape [WIDTH-1:0] collapses to when WIDTH 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.

    + +

    Reports a variable an always_comb writes under an if with no else, or in some arms of a default-less case, 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 if/else or case 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 common_cells/src/deprecated.

    + +

    Reports a declaration that hides one from an enclosing scope of the same design unit — the block-local count that quietly changes what every count 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.

    + +

    Reports $random, $srandom, the $dist_* family and $psprintf, 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; $psprintf is a vendor spelling of $sformatf. Verible’s invalid-system-task-function, same list, same default.

    + +

    Reports an end label that does not name the block it closes, and an end : name 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, begin, fork/join, generate block, clocking block, covergroup, property and sequence. Verible ships this off; lucisv turns it on and files it as an error.

    + +

    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 module-parameter, same default.

    + +

    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 module-port, same default.

    + +

    Reports a packed dimension that counts upwards ([0:7], [0:WIDTH-1]), where bit 0 is the most significant one and every concatenation with an ordinary [7:0] 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 packed-dimensions-range-ordering, same default.

    + +

    Reports $test$plusargs, which matches by prefix — +foobar makes $test$plusargs("foo") true — and asks for $value$plusargs, which matches the whole name and hands back the value. Verible’s plusarg-assignment, same default.

    + +

    Reports if (x);, for (…);, while (…); and their relatives, where the ; is the whole body and whatever is indented under it runs unconditionally. A deliberately empty body is begin end and is not reported. Verible ships this off; lucisv turns it on, because the finding is a typo rather than a matter of taste.

    + +

    Reports a sized literal whose digits need more bits than it declares (4'hFFF), which most simulators truncate silently. Leading zeros do not count, and a literal whose digits are all x/z (3'hz) is left alone — those spell an unknown of that width. Verible’s truncated-numeric-literal, same default.

    + +

    Reports a name this file does not declare, that no external unit it names could supply, and that no other file in the project writes down at all. 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 `included fragment with no unit of its own. Measured on opentitan hw/ and on lucisv’s corpus: the same five findings, all real implicit nets in one ibex formal file. No Verible equivalent.

    + +

    Reports a sized binary literal that writes fewer digits than its width (8'b1), and its safe fix writes the extension the language would have applied — 0 for a literal starting with 0 or 1, the unknown itself for one starting with x or z. A literal whose value is zero is exempt, matching Verible’s lint_zero default. Verible’s undersized-binary-literal, same bases, same defaults.

    + +

    Reports a #(.NAME(…)) override naming a parameter the instantiated module does not declare — including a localparam, 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.

    + +

    Reports a .name(…) connection naming a port the instantiated module does not declare — the port rename that reached three of four instantiations. Same silences as unknown-parameter; .* 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.

    + +

    Reports void'(…) 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 void-cast forbids a named list 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.

    + +

    Reports always @* and always @(*), which SystemVerilog spells always_comb. 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 unsafe: always_comb runs once at time zero and always @* does not, so a testbench that samples before the first change can see a different value.

    + +

    Reports a declared name matching one of the patterns in the patterns 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 tmp a review keeps catching). Every declared name is judged: modules, packages, types, parameters, signals, ports, instances, labels. A pattern must match the whole name.

    + +

    Reports a constraint whose name does not match ([a-z0-9]+_)+c (the pattern option) — the shape Verible enables by default. A constraint’s name is what a test turns off with constraint_mode(0), so it is read far from its declaration.

    + +

    Reports a body that is a single statement rather than a begin ... end block, for eleven constructs each with its own *_enable option (if_enable, else_enable, always_ff_enable, …), 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 else if chain is never reported. The safe fix wraps the body; run the formatter afterwards to lay it out.

    + +

    Reports a null statement whose preceding token is a ; — the ;; an edit leaves behind, and the statement twin of empty-item. The empty header of for (;;) is not a statement and is never reported. The safe fix deletes the extra ;.

    + +

    Reports a generate begin with no : label. An unlabelled block still gets a name (genblk3), 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 begin as a generate one, which on opentitan accounted for 177 of 180 findings before the guard was added.

    + +

    Reports a generate label that starts with none of the prefix option’s entries, g_ and gen_ by default. The prefix is what makes the generate levels of a hierarchical path visible. An empty list accepts every label while generate-label still requires there to be one.

    + +

    Reports an interface whose name does not match [a-z_0-9]+(_if) (the style_regex 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.

    + +

    Reports a line wider than the limit — by default the width the formatter is configured with for that file, so the two halves of lucisv cannot disagree; the length option overrides it. The check is token-aware, as Verible’s is: a line holding one unbreakable token (a long string, an `include 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.

    + +

    Reports a `define whose name does not match [A-Z_0-9]+ (the style_regex 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.

    + +

    Reports every module 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 interface, a program and a package are not modules. Silent in a file that does not fully parse, where recovery can promote a nested declaration to file scope.

    + +

    Reports a one-package file whose name matches neither the package (foo.sv) nor the package with a _pkg suffix (foo_pkg.sv), the two spellings the industry writes. The allow-dash-for-underscore option accepts foo-pkg.sv 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.

    + +

    Reports a type parameter whose name does not match [a-z][a-z_0-9]*_t (the style_regex option). A type parameter is a type, and naming it T makes a declaration read like an expression. Off by default here as in Verible: #(type T = int) is near-universal in UVM code.

    + +

    Reports a port whose name does not end in the suffix for its direction — _i/_ni for an input, _o/_no for an output, _io/_nio for an inout, where the n marks active-low. The suffixes 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.

    + +

    Reports a file whose last line has no newline — formally, a file with no last line: wc -l 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.

    + +

    Reports a net, variable or port inside a module, interface or program whose name does not match [a-z_0-9]+ (the style_regex 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, parameters and subroutine locals are other rules’ business, or nobody’s.

    + +

    Reports a declaration whose type is an anonymous enum. 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.

    + +

    Reports a declaration whose type is an anonymous struct or union, for the reasons typedef-enums gives. The allow_anonymous_nested 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 hw/, all 3 159 findings are nested structs inside a typedef in 57 reggen-generated files, and opentitan’s own Verible config disables the rule with the comment “we allow nested struct definitions”. One option, or one ignore, expresses the same choice here.

    + +

    Reports a <type>::type_id::create("name", …) whose string does not match the handle it is assigned to. That string is the object’s UVM instance name, so every uvm_config_db path, factory override and +uvm_set_config 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 create-object-name-match, same default.

    + +

    Reports a nonblocking assignment in an always_ff whose target does not end in a registered-output suffix (_q, _r, _ff, _reg), one whose _d/_n/_next source does not share its base, and a name ending in one of those suffixes that is driven combinationally instead. Verible’s dff-name-style, same default (off) and the same four options — input, output, waive_ifs_with_conditions and waive_lhs_regex, whose default is Verible’s (?i)mem.* rewritten as [mM][eE][mM].* because lucisv’s pattern engine has no inline flags.

    + +

    Reports disable <label> where the label is not a sequential block’s. Naming a fork block reads as though it kills the forked processes and does something else entirely; disable fork is the spelling that works. Wider than Verible: a task or function declared in the same file is also a legal target here, because disable task_name is ordinary and reporting it would be a false positive. Verible’s disable-statement, same default (off).

    + +

    Reports an `endif with no comment beside it naming the condition it closes, and offers a safe fix that appends // <name>. A bare `endif two hundred lines below its `ifdef 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 endif-comment, same default (off).

    + +

    Reports a function declared outside a class with no automatic or static. Such a function is static, 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 out-of-body definition (function cls::f(…)), which is wider than Verible — lexically it sits outside the class, but it is a class method, and on opentitan hw/ that one exemption removed 948 of 960 findings. Verible’s explicit-function-lifetime, same default.

    + +

    The same rule for tasks, and the case is stronger: a task can block, so a static one is routinely called from two processes at once with one set of locals between them. Verible’s explicit-task-lifetime, same default.

    + +

    Reports a string literal broken across lines with a trailing \. 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 `define is not judged — that is the only spelling the language gives. Verible’s forbid-line-continuations, same default.

    + +

    Reports an invocation of a macro on the macros list, which defaults to Verible’s own single entry, `uvm_warning — a message nothing acts on, where the choice belongs at the point of failure (`uvm_error or `uvm_info). 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 forbidden-macro, same default.

    + +

    Reports a generate … endgenerate region, which SystemVerilog does not need: an if, for or case 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 legacy-generate-region, same default.

    + +

    Reports a genvar declared outside a for 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 legacy-genvar-declaration, same default.

    + +

    Reports the token-concatenation operator written inside a *plain* string literal in a define `` body, where the preprocessor does not expand it and the two backticks reach the output. The `` “…" `` spelling — which the rule skips — is the one that works. Verible's macro-string-concatenation`, same default (off).

    + +

    Reports a begin … end 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 recovers the construct in error-tolerant mode — it reads the block as that unnamed generate block and records a diagnostic at the begin, 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 module-begin-block, same default.

    + +

    Reports a 0x/'b-style radix prefix immediately before a % specifier that prints a different base ("0x%0b"), and any such prefix before a decimal one ("0d%0d"). A specifier with no prefix is always accepted. A log line that prints addr = 0x1010 for a binary value costs the reader an hour. Verible’s numeric-format-string-style, same default (off).

    + +

    Reports a parameter whose name starts with disable, in any case. if (!DisableEcc) is a double negative and DisableEcc = 0 means “ECC is on”, which nobody reads correctly at speed. Verible’s positive-meaning-parameter-name, same default.

    + +

    Reports a parameter written in a module, class or package body rather than in a formal parameter list, and a localparam written where the project’s options do not allow it. A body parameter is still overridable from outside with nothing at the declaration to say so. A formal parameter list is never judged. Verible’s proper-parameter-declaration, same default (off) and the same two options, package_allow_parameter (false) and package_allow_localparam (true).

    + +

    Reports a conditional expression standing unparenthesized in the true-clause of another (a ? b ? c : d : e) and offers a safe fix 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 suggest-parentheses, same shape and same default.

    + +

    Reports an unpacked dimension that counts downwards ([7:0], [DEPTH-1:0]), where element 0 is the last one and every for (i = 0; …) beside it reads the array backwards. The mirror image of packed-dimensions-range-ordering, 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 unpacked-dimensions-range-ordering, same default.

    + +

    Reports a ; written after a `uvm_* macro invocation. The macros expand to a begin … end, so the ; is a null statement — usually inert, and not after if (x) uvm_info(…); else …, where the elsethen 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'suvm-macro-semicolon`, same default.

    + +

    Reports a bare begin … end written directly inside a generate … endgenerate with no if, for or case 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 module-begin-block reads, one scope in. Verible’s v2001-generate-begin, same default.

    +
    \ No newline at end of file diff --git a/docs/site/dist/reference/rust-api/index.html b/docs/site/dist/reference/rust-api/index.html index 739fa03..7435e48 100644 --- a/docs/site/dist/reference/rust-api/index.html +++ b/docs/site/dist/reference/rust-api/index.html @@ -1,4 +1,4 @@ -Rust API index | lucisv

    Rust API index

    Public functions indexed

    -

    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.

    +

    Rust API index

    Public functions indexed

    +

    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.

    @@ -218,7 +225,7 @@ - + @@ -324,7 +331,15 @@ - + + + + + + + + + @@ -343,15 +358,15 @@ - + - + - + @@ -367,7 +382,23 @@ - + + + + + + + + + + + + + + + + +
    verify_equivalenceConfirm normalized syntax is unchangedRe-lex and compare normalized tokens, including comments
    verify_convergence
    select_rulesApply select/ignore names to the registryApply select/ignore rule names or severity classes to the registry
    rules_namedExpand a rule name or severity class to registered rules
    module_interfacesBuild the module interface facts used by lint oracles
    rules_markdown
    ParsedSourceparse, lex_error, tokens, contextparse, lex_error, tokens, file, context
    LintContextnew, 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, commentsnew, 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
    MentionOracleImplement mentioned_outside to supply a project-wide identifier censusSupply mentioned_outside and optional module_interface for project-aware checks
    Violation
    module functionapply_fixesapply_fixes (caller must filter format-fenced edits)
    Severityas_str, from_name, describes; classes Error, Warning, Style
    RuleOptionsnew, is_empty, set_raw, set, overlay, is_set, bool, int, str, list
    OptionKind / OptionDefaultas_str, vocabulary / value, as_written
    editor settings functionsvscode_lint_settings, rule_setting, severity_setting
    @@ -387,7 +418,7 @@ 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 +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 @@ -414,7 +445,7 @@ 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 +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 @@ -422,7 +453,7 @@ FileFacts -of, from_analysis, words, path, encode, decode +of, from_analysis, words, macro_words, path, encode, decode DefinitionKey @@ -445,11 +476,15 @@ Sort workspace inputs into their deterministic index order -words::harvest / harvest_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.

    @@ -528,6 +563,10 @@ + + + + @@ -577,7 +616,7 @@
    Search indexed module names
    sites_phraseShare the port-action site-count wording with server offers
    instantiation_plan Build an instantiation plan from an indexed module
    - + @@ -587,6 +626,10 @@ + + + + @@ -597,4 +640,4 @@
    atomic::write_atomicReplace 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
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/docs/site/dist/start/configuration/index.html b/docs/site/dist/start/configuration/index.html index 41463cf..de610c6 100644 --- a/docs/site/dist/start/configuration/index.html +++ b/docs/site/dist/start/configuration/index.html @@ -1,4 +1,4 @@ -Configuration | lucisv

    Configuration

    Place lucisv.toml or .lucisv.toml beside your project. Every key is optional.

    lucisv.toml
    line-length = 100
    indent = 2
    exclude = ["*_gen.sv", "build"]
    filelist = "rtl/files.f"
    -
    [lint]
    select = ["no-tabs", "unused-signal"]
    ignore = ["module-filename"]
    +
    [lint]
    select = ["no-tabs", "unused-signal"]
    ignore = ["module-filename"]
    +
    [lint.line-length]
    length = 120
    +
    [lint.signal-name-style]
    style_regex = "[a-z_0-9]+"
    @@ -117,18 +119,22 @@ - - + + - - + +
    [lint].select string array defaultslint rule namesCLI and serverrule names or severity classesCLI
    [lint].ignore string array []lint rule namesCLI and serverrule names or severity classesCLI
    +

    [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.

    For each input, lucisv searches upward from that path’s directory:

    @@ -140,7 +146,7 @@

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.

Strict parsing

Section titled “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

Section titled “Editor settings”
@@ -244,11 +250,36 @@ - + + + + + + + + + + + + + + + +
lucisv.lint.ignore []Remove rules from the selected or default setRemove rules or severity classes from the selected or default set
lucisv.lint.severity.error / .warning / .styletrueEnable each severity class
lucisv.lint.rules.<rule>defaultOverride 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

Section titled “Cache”

Successful “already formatted” verdicts are cached under .lucisv_cache/. Entries are keyed by file, content hash, line length, indentation, and lucisv version. Files that would change or fail are never cached. Use --no-cache to disable reads and writes or --cache-dir to relocate the store.

- \ No newline at end of file + \ No newline at end of file diff --git a/docs/site/dist/start/quick-start/index.html b/docs/site/dist/start/quick-start/index.html index d4e9bd4..5430a87 100644 --- a/docs/site/dist/start/quick-start/index.html +++ b/docs/site/dist/start/quick-start/index.html @@ -1,4 +1,4 @@ -Quick start | lucisv