class warning_significance¶
Enumeration class describing the significance setting for a warning class.
warning_significance Members¶
| Constructors | none |
| Static Method | from_integer() |
| Methods | __cmp__(), __eq__(), __ge__(), __gt__(), __hash__(), __le__(), __lt__(), __ne__(), __repr__(), __str__(), as_integer(), name() |
| Attributes | DIAGNOSTIC, FROM_MANIFEST, REDUNDANCY, RELIABILITY, SECURITY, STYLE, UNSPECIFIED |
warning_significance Details¶
-
class
cs.warning_significance¶ Enumeration class describing the significance setting for a warning class.
-
static
from_integer(_inner)¶ Construct an instance from an integer representation.
Parameters: _inner (int) – The integer representation, as returned by warning_significance.as_integer().Return type: warning_significanceRaises: result.ERROR_INVALID_ARGUMENTif_inneris not a valid integer representation for awarning_significanceinstance.Invariant: For
warning_significancex, warning_significance.from_integer(x.as_integer()) == x>>> ws = warning_significance.DIAGNOSTIC.as_integer() >>> ws 5 >>> warning_significance.from_integer(ws) <cs.warning_significance diagnostic>
-
__cmp__(other)¶ Comparison function for
warning_significance, with respect to a stable overall ordering.Parameters: other ( warning_significance) – Thewarning_significanceobject to compare against.Return type: int Returns: An integer N such that: - N==0 if the two objects compare equal
- N<0 if
self< other - N>0 if
self> other
>>> warning_significance.FROM_MANIFEST.__cmp__(warning_significance.SECURITY) -1
-
__eq__(b)¶ Equality operator for
warning_significance.Parameters: b ( warning_significance) – Thewarning_significanceobject to compare against.Return type: bool Returns: Trueifselfandbcompare equal,Falseotherwise.>>> warning_significance.SECURITY == warning_significance.RELIABILITY False
-
__ge__(b)¶ Greater-than-or-equal operator for
warning_significance.Parameters: b ( warning_significance) – Thewarning_significanceobject to compare against.Return type: bool Returns: Trueifself>=b,Falseotherwise.>>> warning_significance.DIAGNOSTIC >= warning_significance.RELIABILITY True
-
__gt__(b)¶ Greater-than operator for
warning_significance.Parameters: b ( warning_significance) – Thewarning_significanceobject to compare against.Return type: bool Returns: Trueifself>b,Falseotherwise.>>> warning_significance.FROM_MANIFEST > warning_significance.REDUNDANCY False
-
__hash__()¶ Hash function for
warning_significance.Return type: int >>> hash(warning_significance.STYLE) 4
-
__le__(b)¶ Less-than-or-equal operator for
warning_significance.Parameters: b ( warning_significance) – Thewarning_significanceobject to compare against.Return type: bool Returns: Trueifself<=b,Falseotherwise.>>> warning_significance.SECURITY <= warning_significance.DIAGNOSTIC True
-
__lt__(b)¶ Less-than operator for
warning_significance.Parameters: b ( warning_significance) – Thewarning_significanceobject to compare against.Return type: bool Returns: Trueifself<b,Falseotherwise.>>> warning_significance.FROM_MANIFEST < warning_significance.FROM_MANIFEST False
-
__ne__(b)¶ Inequality operator for
warning_significance.Parameters: b ( warning_significance) – Thewarning_significanceobject to compare against.Return type: bool Returns: Falseifselfandbcompare equal,Trueotherwise.>>> warning_significance.REDUNDANCY != warning_significance.FROM_MANIFEST True
-
__repr__()¶ Get a representation of a
warning_significanceobject that includes information useful for debugging.Return type: str Returns: The string representation. >>> repr(warning_significance.DIAGNOSTIC) '<cs.warning_significance diagnostic>'
-
__str__()¶ Get a simple string representation of a
warning_significanceobject.Return type: str Returns: The string representation. >>> str(warning_significance.STYLE) 'style'
-
as_integer()¶ Get an integer representation of
self.Return type: int Returns: An integer suitable for use with warning_significance.from_integer().Invariant: For
warning_significancex, warning_significance.from_integer(x.as_integer()) == x>>> ws = warning_significance.DIAGNOSTIC.as_integer() >>> ws 5 >>> warning_significance.from_integer(ws) <cs.warning_significance diagnostic>
-
name()¶ Get the name of a
warning_significanceobject.Return type: str Returns: The name. >>> warning_significance.RELIABILITY.name() 'reliability'
-
DIAGNOSTIC¶ diagnostic: warnings of this class do not indicate vulnerabilities, they indicate the locations of events or artifacts of interest.
>>> warning_significance.DIAGNOSTIC <cs.warning_significance diagnostic>
-
FROM_MANIFEST¶ Use this when creating a warning class to denote that the significance is to be read from the manifest: any significance value provided to the warning class creation function is ignored.
>>> warning_significance.FROM_MANIFEST <cs.warning_significance unspecified>
-
REDUNDANCY¶ redundancy: redundant code; may indicate a logic error.
>>> warning_significance.REDUNDANCY <cs.warning_significance redundancy>
-
RELIABILITY¶ reliability: a code correctness issue.
>>> warning_significance.RELIABILITY <cs.warning_significance reliability>
-
SECURITY¶ security: a security vulnerability.
>>> warning_significance.SECURITY <cs.warning_significance security>
-
STYLE¶ style: a violation of one or more coding guidelines.
>>> warning_significance.STYLE <cs.warning_significance style>
-
UNSPECIFIED¶ No significance value was specified.
>>> warning_significance.UNSPECIFIED <cs.warning_significance unspecified>
-
static