-
Bug
-
Resolution: Fixed
-
Minor
The help text (https://github.com/jenkinsci/analysis-model/blob/v11.4.0/src/main/java/edu/hm/hafner/analysis/registry/PyLintDescriptor.java#L30-L37) currently states:
public String getHelp() { return "<p>Create a ./pylintrc that contains:" + "<p><code>msg-template={path}:{module}:{line}: [{msg_id}({symbol}), {obj}] {msg}</code></p>" + "</p>" + "<p>Start pylint using the command:" + "<p><code>pylint --rcfile=./pylintrc CODE > pylint.log</code></p>" + "</p>"; }
But I got "[PyLint] > found 0 issues (skipped 0 duplicates)" until I added "-output-format=parseable" as well (it might only be required if the output gets more "complex" though).
The source-code even mentions this argument in a comment (https://github.com/jenkinsci/analysis-model/blob/v11.4.0/src/main/java/edu/hm/hafner/analysis/parser/PyLintParser.java#L22-L23):
// the default pattern matches "--output-format=parseable" output. private static final String PYLINT_PATTERN = "(?<path>(?:[A-Z]:\\\\)?[^:]*)(?:\\:(?<module>.*))?:(?<line>\\d+): \\[(?<type>(?<category>[A-Z])\\d*)?(?:\\((?<symbol>.*)\\), )?.*?\\] (?<message>.*)";
Some other sources/discussions:
- https://stackoverflow.com/questions/55106065/jenkins-pylint-warnings-tool-parses-log-files-but-reports-found-0-issues
- https://stackoverflow.com/questions/41875412/use-pylint-on-jenkins-with-warnings-plugin-and-pipeline
The "--msg-template" argument might also simplify things. I ended up using these parameters:
--output-format=parseable --msg-template='{path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})'
- links to