Skip to content

Commit

Permalink
feature269 Describe intended functionality of env vars in MANUAL.
Browse files Browse the repository at this point in the history
SVLINT_INCDIRS, SVLINT_PREFILES, SVLINT_POSTFILES
  • Loading branch information
DaveMcEwan committed Nov 11, 2023
1 parent 5add765 commit 853d5a2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions md/manual-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,39 @@ All loaded plugins, via the `--plugin` option, are enabled and have access
to all values in the TOML configuration.


## Environment Variables

Svlint is sensitive to 4 environment variables:
- `SVLINT_CONFIG` - an exact absolute or relative path to a TOML configuration.
This is the only way to specify an *exact* configuration path, as the `-c`
command-line option is used to search hierarchically.
- `SVLINT_INCDIRS` - a colon-separated list of include paths, i.e. an
alternative to using the `-I` command-line option.
- `SVLINT_PREFILES` - a colon-separated list of files to process before those
given on the command-vline.
- `SVLINT_POSTFILES` - a colon-separated list of files to process after those
given on the command-line.


For example:
```sh
svlint -I/cad/tools/uvm -I/work/myTeam \
uvm_macros.svh \
/another/thing/first \
foo.sv bar.sv \
/another/thing/last \
check_pp_final_state.svh
```

Is exactly equivalent to:
```sh
$ export SVLINT_INCDIRS="/cad/tools/uvm:/work/myTeam"
$ export SVLINT_PREFILES="uvm_macros.svh:/another/thing/first"
$ export SVLINT_POSTFILES="/another/thing/last:check_pp_final_state.svh"
$ svlint foo.sv bar.sv
```


## Configuration

Firstly, you need a TOML configuration file to specify which rules to enable.
Expand Down

0 comments on commit 853d5a2

Please sign in to comment.