oct
Loading...
Searching...
No Matches
waivers.WaiverOutcome Class Reference

Public Member Functions

bool blocked (self)
str message (self)
int first_line (self)

Static Public Attributes

tuple surviving [tuple[int, str], ...]
tuple suppressed [tuple[int, str], ...]
tuple legacy_lines [int, ...]

Detailed Description

The result of scoping a rule's waivers over a scanner message.

``surviving`` and ``suppressed`` are ``(lineno, text)`` pairs; a
``lineno`` of ``0`` means the scanner reported no location (e.g. the
unparseable-file message), which no line waiver can reach.

``legacy_lines`` lists the bare ``disable=`` waivers that suppressed
findings ONLY by falling back to pre-193 whole-file semantics. It is
empty whenever the legacy branch was not exercised - including when
a stale waiver had nothing to suppress - so it counts exactly the
files that would change verdict if the legacy branch were deleted.

Definition at line 130 of file waivers.py.

Member Function Documentation

◆ blocked()

bool waivers.WaiverOutcome.blocked ( self)
True when at least one finding survived every waiver.

Definition at line 149 of file waivers.py.

◆ first_line()

int waivers.WaiverOutcome.first_line ( self)
Line of the first surviving finding (``0`` when none survive).

Definition at line 159 of file waivers.py.

◆ message()

str waivers.WaiverOutcome.message ( self)
The surviving findings re-joined in the scanner's own format.

Definition at line 154 of file waivers.py.

Member Data Documentation

◆ legacy_lines

tuple waivers.WaiverOutcome.legacy_lines [int, ...]
static

Definition at line 146 of file waivers.py.

◆ suppressed

tuple waivers.WaiverOutcome.suppressed [tuple[int, str], ...]
static

Definition at line 145 of file waivers.py.

◆ surviving

waivers.WaiverOutcome.surviving [tuple[int, str], ...]
static

Definition at line 144 of file waivers.py.


The documentation for this class was generated from the following file: