Finding
Finding(code, message, status=CheckStatus.NOTE, hint=None)One thing a check found, for programs that read the report.
Attributes
code : str-
Stable identifier of the rule, “
. ” in lower case with hyphens inside the rule part, such as “changelog.missing”. message : str-
One line of plain text that says what was found.
status : CheckStatus-
How severe the finding is: NOTE, WARNING or ERROR.
hint : str | None-
One sentence that says what to do about the finding. A check sets it when the advice depends on what was found. When it is None, the runner fills it from the
hintsof the check.
Examples
>>> finding = Finding("changelog.missing", "No changelog found")
>>> finding.status
<CheckStatus.NOTE: 'note'>
>>> finding.to_dict()
{'code': 'changelog.missing', 'status': 'note',
'message': 'No changelog found', 'hint': None}Methods
| Name | Description |
|---|---|
| to_dict | Convert to dictionary for JSON serialization. |
to_dict
Finding.to_dict()Convert to dictionary for JSON serialization.