Linting is largely shared between our products. This page only covers VS Code specific use cases. Refer to the common documentation to learn more.
Configuring the Linting Rules
Linting rules can be configured per project, folder, or file by right-clicking a project, folder, or file in the Sigasi Projects view, selecting Open Preference View and then clicking VHDL Errors/Warnings or Verilog Errors/Warnings.
Then, enable custom validation settings to activate the rule configuration.
You will then be able to change the linting rule configurations.
Naming Conventions and Header Comment Checks
Sigasi can check whether all sorts of names in the design -
entities, instances, modules, signals, variables… - follow
particular patterns. This may help designers to follow their
company’s or team’s coding rules. For example, coding rules may
prescribe that signal names must have a s_
prefix, that generics
names must be written in capitals, or that variable names must use
CamelCase. A naming convention rule is empty by default, which means
that the particular rule is not checked.
In addition, Sigasi can also check for header comments of files, design units, subprograms, etc. This could for instance be used to check whether a copyright notice or disclaimer has been included in the file header comment.
Naming conventions configuration can be found in the Style Validation rule category.
At the top-right, you can set the severity of naming convention non-conformities. Below the severity settings, you can enter the validation patterns. Patterns use the RE2/J regular expressions syntax. Note that names are not validated if the corresponding validation pattern is empty.
You can add two patterns per name: a valid pattern that the name must match (a marker will appear if it does not match) and an invalid pattern that the name must not match (a marker will appear if it does). You can set either or both patterns per name.
Similarly, header comment configuration can also be found in the Style Validation rule category.
Markers
In the VS Code editor, Sigasi marks errors, warnings, and infos with red, yellow, and blue underlines, respectively. This keeps you visually aware of the problems or infos in your code.
Quick Fixes
Problems that have markers can be automatically resolved through a Quick Fix. To see whether a Quick Fix is available, hover over a problem underline.
Then click Quick Fix… and select one of the Quick Fixes from the list.
You can also click on the problem marker to make a lightbulb icon appear at the beginning of that line. You can click the lightbulb and make the Quick Fix list appear. You can then select one of the Quick Fixes from the list.
Finally, Quick Fixes can also be triggered from the Problems View by hovering over a problem and clicking the appearing lightbulb icon.