Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71665

The getHelp() text for PyLint should suggest "--output-format=parseable" as well

XMLWordPrintable

      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:

       

      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})' 

            primeos Michael Weiss
            primeos Michael Weiss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: