Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Include files and incdirs from the environment. #271

Merged
merged 5 commits into from
Nov 20, 2023

Conversation

DaveMcEwan
Copy link
Contributor

As per #269, thanks @Sv3n.

  • 3 new environment variables SVLINT_INCDIRS, SVLINT_PREFILES, and SVLINT_POSTFILES to facilitate always-used files, such as a UVM installation.
  • The environment variables are each a colon-separated list of locations on the filesystem, just like PATH, so this mechanism is compatible with Environment Modules.
  • This is effectively a shortcut to avoid lots of typing on the command line, so you can use the --dump-filelist option to see exactly what is being passed to the parser.
  • In the same way that svlint -Ifoo/ bar.sv only looks for bar.sv in the current directory, but not in the incdir foo/, the files listed in SVLINT_PREFILES and SVLIST_POSTFILES are not searched for in any include directories.
  • Minor changes to introduction section of MANUAL to make the PDF easier to navigate (usability of GitHub's rendering is not really changed).

SVLINT_INCDIRS, SVLINT_PREFILES, SVLINT_POSTFILES
This command...
```sh
$ SVLINT_PREFILES='preA:preB' \
  SVLINT_POSTFILES='postA:postB' \
  SVLINT_INCDIRS='incA:incB' \
  cargo run -- --dump-filelist=yaml -IincX -IincY cliX.sv cliY.sv
```

...gives the output:
```
".":
  files:
    - "preA"
    - "preB"
    - "cliX.sv"
    - "cliY.sv"
    - "postA"
    - "postB"
  incdirs:
    - "incA"
    - "incB"
    - "incX"
    - "incY"
  defines:
```
@dalance
Copy link
Owner

dalance commented Nov 20, 2023

I agree to introducing new environment variables.

@dalance dalance merged commit 943c6c8 into dalance:master Nov 20, 2023
4 checks passed
@eddygta17
Copy link

Including and usage of the UVM library with svlint causes a stack overflow to occur on svlint 0.9.0. Since the merged branch adds only checking environment variables, I have not checked it with the latest codebase.

@DaveMcEwan DaveMcEwan deleted the feature269 branch December 10, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants