TODO section 33. Every rule states a Severity (error: would likely fail
to compile or elaborate, or silently mis-synthesize; warning: a probable
bug; style), printed in lucisv check text and JSON, mapped to
ERROR/WARNING/INFORMATION in the editor, grouped in --rules-doc, and
accepted by --select/--ignore and [lint] as a class word. VS Code gains
lucisv.lint.severity.{error,warning,style} and one tri-state
lucisv.lint.rules.<rule> per rule (default/on/off - a client sends
every key, so a boolean cannot say unset), generated by
vlog_linter::vscode with a drift test, and lint::enabled_rules is the
one documented ladder: defaults -> select -> class switches -> per-rule
-> ignore. Nineteen new rules (17 -> 36), one file each with true
positives and near-misses: Error - mismatched-labels,
duplicate-declaration (Semantics::duplicates(), additive),
undeclared-identifier (with a project; silent for macro text, included
fragments, hierarchical tails, any name another file mentions),
unknown-port, unknown-parameter; Warning - forbid-defparam,
invalid-system-task-function, truncated-numeric-literal,
undersized-binary-literal (safe fix), suspicious-semicolon,
packed-dimensions-range-ordering, module-port, module-parameter,
explicit-function-task-parameter-type, plusarg-assignment,
instance-shadowing, forbid-negative-array-dim, void-cast,
incomplete-assignment. Every false-positive class found on opentitan
closed with a named test; 3 383 tests / 48 binaries; corpus 814/820
and byte-identical (formatter untouched); vsix smoke OK.
docs/features/linter-expansion-1/README.md.
Co-Authored-By: Claude Fable 5 <[email protected]>
17 lines
629 B
Rust
17 lines
629 B
Rust
//! Prints the `lucisv.lint.severity.*` and `lucisv.lint.rules.*` settings for
|
|
//! `editors/vscode/package.json`, generated from the rule registry.
|
|
//!
|
|
//! ```text
|
|
//! cargo run -p vlog_linter --example vscode_lint_settings
|
|
//! ```
|
|
//!
|
|
//! Paste the body of the printed object into that file's
|
|
//! `contributes.configuration.properties`, replacing the block that is there.
|
|
//! The drift test in `lucisv_server` (`settings::tests::
|
|
//! the_vscode_lint_toggles_match_the_registry`) fails whenever the two
|
|
//! disagree, so a rule cannot ship without its toggle.
|
|
|
|
fn main() {
|
|
print!("{}", vlog_linter::vscode_lint_settings());
|
|
}
|