VHDL134: All declared elements should be used in their corresponding scope
Summary
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| MEDIUM | - | MEDIUM | Intentionality | Clear | 20min | synthesis, do254-cp14, do254, vscode, simulation, linter, cnes, cnes-std-03100 |
Description
All declared elements should be used in their corresponding scope. Useless declarations should be removed.
Noncompliant code example
procedure proc is variable tmp: std_logic; constant cst: std_logic := '0'; constant other_cst: std_logic := '1'; -- Noncompliant: "other_cst" is not used begin tmp <= cst; end proc;
Compliant solution
procedure proc is variable tmp: std_logic; constant cst: std_logic := '0'; begin tmp <= cst; end proc;
Parameters
No parameters.