From 853d5a25f99d1d20246e7f70ab607f20a3f48279 Mon Sep 17 00:00:00 2001 From: Dave McEwan Date: Sat, 11 Nov 2023 21:36:03 +0000 Subject: [PATCH] feature269 Describe intended functionality of env vars in MANUAL. SVLINT_INCDIRS, SVLINT_PREFILES, SVLINT_POSTFILES --- md/manual-introduction.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/md/manual-introduction.md b/md/manual-introduction.md index 9cda94d6..d188e29a 100644 --- a/md/manual-introduction.md +++ b/md/manual-introduction.md @@ -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.