In VHDL, you can use ranges with to and downto. But, if you use the
wrong direction, you get an empty range, which is usually not what you
want.
signal foo: std_logic_vector(7 downto 0) -- range of 8;
signal foo: std_logic_vector(7 to 0) -- null range;We have a lint check that warns about this, even if you use constants or some simple arithmetic.
Rule configuration
These rules can be disabled for your project, or their severity and parameters can be modified in the project linting settings. Alternatively, they can be manually configured using one of the following templates, depending on the type of project you use.
For Modular Projects, add these entries to your project's
.sigasi/settings.jsonsettings file. To scope the settings to a specific folder or file instead of the whole project, place them inside an@overrideblock; to scope them to a specific target, place them inside a@targetsblock.JSONC{ // For ascending ranges "vhdl.rules.1.severity": "{ERROR|WARNING|INFO|IGNORE}", // For descending ranges "vhdl.rules.26.severity": "{ERROR|WARNING|INFO|IGNORE}" }For Classic Projects, add the VHDL lines to
.settings/com.sigasi.hdt.vhdl.linting.prefsand the Verilog/SystemVerilog lines to.settings/com.sigasi.hdt.verilog.linting.prefs:PREFS# For ascending ranges 1/severity/${path}={error|warning|info|ignore} # For descending ranges 26/severity/${path}={error|warning|info|ignore}