Inline Lint Waivers
Lint waivers can be extracted from user comments containing a specific pragma.
code line 1
code line 2
// @DVT_LINTER_WAIVER_START "#NAME#" #STATUS# #CHECKS#
code line 4
...
code line 7
// @DVT_LINTER_WAIVER_END "#NAME#"
code line 8
code line 10 // @DVT_LINTER_WAIVER "#NAME#" #STATUS# #CHECKS#
code line 11
code line 12 /* @DVT_LINTER_WAIVER "#NAME#" #STATUS# #CHECKS# */ // inline comment
code line 13 /* @DVT_LINTER_WAIVER "#NAME#" #STATUS# #CHECKS# */ /* @DVT_LINTER_WAIVER "#NAME#" #STATUS# #CHECKS# */ // inline comment
Parameters:
#NAME#
Must be an unique id of a waiver
It is optional; if not defined, a default name containing file and line is used
#STATUS#
Any value from the following set of values (mandatory)
error : hits matched by this waiver will be reported as errors
warning : hits matched by this waiver will be reported as warnings
info : hits matched by this waiver will be reported as infos
disable : hits matched by this waiver will not be stored
If two or more waivers cover the same piece of code they will apply in the order they were declared.
Inline waivers are applied before file waivers
#CHECKS#
Is a comma separated list of check names
Note
Inline waivers are applied only on failures in the same file where they were declared.
The failures in files included between begin and end of a waiver are not affected by the waiver.
The begin/end of multiline waivers must always be in the same file.
The multiline waivers can be interlaced by using names for start and end pragmas.
The inline waivers must be inserted before inline comments as block comments, otherwise they will not be identified.
UVMF Custom Pragma Waivers
UVMF Custom pragma waivers are also extracted from user comments, and they have a specific format.
code line 1
code line 2
// pragma uvmf ... begin
code line 4
...
code line 7
// pragma uvmf ... end
code line 9
Unlike regular inline waivers, Verissimo will only show failures for the code included between begin and end of the pragmas. To enable this behavior, the lint waivers XML file must contain the tag as child of the root tag . Inside the tag, you can specify the paths or files that contain generated code and which will be waived using the node <path>. If there is no <path> node defined, the waiver applies for all files.
Implementation Notes:
A waiver titled #Waive all UVMF Custom Pragmas# will be created to waive all failures in files specified inside the tag.
Subsequently, individual waivers for each UVMF custom pragma will be created to re-enable failures within the scope of those specific pragmas.
These waivers are placed first in the waivers list since they have the highest precedence.
The waiver will take the name of the pragma.