from spotregen import Finding
from spotregen.checks import exit_code
warning = Finding("warning", "DEL03", "core.calc", "no longer referenced")
print(exit_code([warning]), exit_code([warning], strict=True))0 1
The exit code of spotregen check for a list of findings.
| Name | Type | Description | Default |
|---|---|---|---|
| findings | list[Finding] | The findings of run_checks. |
required |
| strict | bool | Also fail on warnings. | False |
| Name | Type | Description |
|---|---|---|
| int | int | 1 if there is an error, or a warning and strict is set, else 0. |