|
caellion-python-commons
|
This class provides a set of methods to create reports that are compatible with Jenkins' warnings-ng plugin. More...
Public Member Functions | |
| def | __init__ (self) |
| Initialize the ReportBuilder. More... | |
| def | extract_basename_file (self, path) |
| Extracts basename of a given path (only files). More... | |
| def | addIssue (self, path, severity, message, lineStart=-1, lineEnd=-1, columnStart=-1, columnEnd=-1, category=None, type=None, description=None, packageName=None, moduleName=None, additionalProperties=None) |
| Adds a new issue to the report. More... | |
| def | generateReport (self) |
| Generates the report in json format. More... | |
Static Public Attributes | |
| issues_all = None | |
This class provides a set of methods to create reports that are compatible with Jenkins' warnings-ng plugin.
Definition at line 9 of file reports.py.
| def caellion.pycommons.codeanalysis.reports.ReportBuilder.__init__ | ( | self | ) |
Initialize the ReportBuilder.
Definition at line 16 of file reports.py.
| def caellion.pycommons.codeanalysis.reports.ReportBuilder.addIssue | ( | self, | |
| path, | |||
| severity, | |||
| message, | |||
lineStart = -1, |
|||
lineEnd = -1, |
|||
columnStart = -1, |
|||
columnEnd = -1, |
|||
category = None, |
|||
type = None, |
|||
description = None, |
|||
packageName = None, |
|||
moduleName = None, |
|||
additionalProperties = None |
|||
| ) |
Adds a new issue to the report.
| path | path to the file in which the issue happens |
| severity | severity level for the issue, allowed options are LOW, NORMAL, HIGH, CRITICAL or ERROR |
| message | issue message (brief description of the problem) |
| lineStart | line at which issue happens or starting line of a block in which it happens |
| lineEnd | ending line of a block in which issue hapens |
| columnStart | column at which issue happens or starting column of a block in which it happens |
| columnEnd | ending column of a block in which issue happens |
| category | issue category to show in jenkins |
| type | issue type to show in jenkins |
| description | issue description (longer and more precise than message) |
| packageName | fully qualified name of the package in which the issue happens |
| moduleName | fully qualifies name of the module in which the issue happens |
| additionalProperties | additional parameters to pass to Jenkins' warnings-ng plugin |
Definition at line 36 of file reports.py.
| def caellion.pycommons.codeanalysis.reports.ReportBuilder.extract_basename_file | ( | self, | |
| path | |||
| ) |
Extracts basename of a given path (only files).
Should Work with any OS Path on any OS
| path | path to get base folder path of |
Definition at line 25 of file reports.py.
| def caellion.pycommons.codeanalysis.reports.ReportBuilder.generateReport | ( | self | ) |
Generates the report in json format.
Definition at line 106 of file reports.py.
|
static |
Definition at line 14 of file reports.py.