.. _Waivers Tab:

Waivers Tab
-----------

.. rst-class:: lead

  The waivers tab can be used to add, remove, edit and inspect waivers and pre-waivers.

There are three types of waivers:

-  Manually defined waivers
-  Manually defined pre-waivers
-  Inline waivers (collected from code)

Waivers are used to change the status of the failures or remove the failures that are matched.
Pre-waivers are used to exclude files from linting, therefore reducing the total linting time.

.. figure:: ../../images/vlogdt-uvm-compliance-waivers-tab.png




Waivers Editor
~~~~~~~~~~~~~~



Manually defined waivers can be created using :guilabel:`New...` button from the Waivers tab. The **Lint Waivers Editor** dialog offers an easy way to configure a waiver. The parameters that can be configured are:

- **File**: the file where the waiver will be saved (from the waivers include tree)
- **Name**: an unique name for the waiver
- **Description**: a short explanation for the waiver
- **Status**: the status that will be applied to the matched failures
- **Apply on**: the scope of the waiver (it applies on matched or non matched failures)
- **Paths**: the file paths on which this waiver applies to
- **Check Names**: the name of the checks this waiver applies to
- **Message Patterns**: the regular expression this waiver must match (Perl-like or simple regular expression)
- **Line Ranges**: the line, or line ranges (StartLine:EndLine) this waiver must match
- **Elements**: the elements used to obtain a set of files that will be waived; files containing only such elements and all the files included in the scope of those elements will be waived

The status option can be set to:

- **DISABLED**: failures are removed
- **ERROR**: failures are reported as errors
- **WARNING**: failures are reported as warnings
- **INFO**: failures are reported as info

The waiver will match a failure if all defined parameters match the failure properties (the check that generated the failure, line, file, or message). If a parameter is empty (not defined) it will match any value.

.. figure:: ../../images/waiver-dialog-showcase.png




Pre-Waivers Editor
~~~~~~~~~~~~~~~~~~



Manually defined pre-waivers can be created using :guilabel:`New...` button from the Waivers tab and setting the **Waiver Type** to PRE-WAIVER. The parameters that can be configured are:

- **File**: the file where the pre-waiver will be saved (from the waivers include tree)
- **Name**: an unique name for the pre-waiver
- **Description**: a short explanation for the pre-waiver
- **Apply on**: the scope of the pre-waiver (it applies on matched or non matched paths)
- **Paths**: the paths on which this waiver applies to
- **Check Names**: the name of the checks this pre-waiver applies to
- **Elements**: the elements used to obtain a set of files that will be pre-waived; files containing only such elements and all the files included in the scope of those elements will be pre-waived

.. figure:: ../../images/pre-waiver-dialog-showcase.png




Inline Waivers
~~~~~~~~~~~~~~


:ref:`Inline Lint Waivers` can be inserted in code as comments with the following syntax:

.. code-block:: 

    // @DVT_LINTER_WAIVER_START ["NAME"] STATUS [CHECK_1, CHECK_2]
    code line
    ...
    code line
    // @DVT_LINTER_WAIVER_END ["NAME"]

Where:

- **NAME**: is the waiver unique name (optional) and must be enclosed within quotation marks
- **STATUS**: is the status applied to the hits (mandatory) and must be one of the valid status values (DISABLE, ERROR, WARNING, INFO)
- **CHECK_1, CHECK_2**: is a list of check names (optional) this waiver applies to, if it's not defined the waiver applies to all checks

.. figure:: ../../images/vlogdt-uvm-compliance-code-waiver.png




.. figure:: ../../images/code-waiver-dialog-showcase.png

