Although the input direction is taken by default, it is preferable to explicitly specify the direction to improve readability and make the code self-documenting.
module bad_example;
function int my_func(int a, b); // bad: direction of a and b omitted
return a+b;
endfunction
task my_task(int a, b); // bad: direction of a and b omitted
begin
$display(a);
$display(b);
end
endtask
endmodulemodule good_example;
function int my_func(input int a, b); // good: direction of a and b specified
return a+b;
endfunction
task my_task(input int a, b); // good: direction of a and b specified
begin
$display(a);
$display(b);
end
endtask
endmoduleRule configuration
This rule can be disabled for your project, or its severity and parameters can be modified in the project linting settings. Alternatively, it 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{ "verilog.rules.14.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:PREFS14/severity/${path}={error|warning|info|ignore}