SystemVerilog linter
Download from release page, and extract to the directory in PATH.
You can install from snapcraft
sudo snap install svlint
You can install by cargo.
cargo install svlint
First of all, you must put a configuration file .svlint.toml
to specify enabled rules.
Configuration file is searched to the upper directory until /
.
So you can put configuration file (.svlint.toml
) on the repository root like .gitignore
.
The example of configuration file is below:
```toml [option] exclude_paths = ["ip/.*"]
[rules] nonansimodule = true wire_reg = true ```
The complete example can be generated by svlint --example
[option]
sectionexclude_paths
is a list of regular expression. If a file path is matched with the list, the file is skipped to check.
[rules]
sectionBy default, all rules are disabled. If you want to enable some rules, true
can be specified.
| Name | Description | | ------------------------- | ----------------------------------------------------------- | | enumwithtype | enum must have data type | | forwithbegin | multiline 'for' statement must have 'begin' | | functionwithautomatic | 'function' must be 'automatic' | | generateforwithlabel | 'generate for' must have label | | generateifwithlabel | 'generate if' must have label | | generatekeyword | 'generate'/'endgenerate' must be omitted | | genvardeclaration | genvar must be declared in loop | | ifwithbegin | multiline 'if' statement must have 'begin' | | inoutwithtri | 'inout' must have 'tri' | | inputwithvar | 'input' must have 'var' | | legacyalways | 'alwayscomb'/'alwaysff'/'alwayslatch' must be used | | loopvariabledeclaration | loop variable must be declared in loop | | nonansimodule | module declaration must be ANSI-style | | outputwithvar | 'output' must have 'var' | | parameterinpackage | 'parameter' must be replaced to 'localparam' in package | | prioritykeyword | 'priority' is forbidden | | tabcharactor | tab charactor is forbidden | | unique0keyword | 'unique0' is forbidden | | uniquekeyword | 'unique' is forbidden | | wire_reg | 'wire'/'reg' must be replaced to 'logic'/'tri' |
``` svlint 0.1.0
USAGE:
svlint [FLAGS] [OPTIONS]
FLAGS: --example Prints config example -h, --help Prints help information -s, --silent Suppresses message -1 Prints results by single line -V, --version Prints version information -v, --verbose Prints verbose message
OPTIONS:
-c, --config
ARGS: