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

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

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

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

          Michael Weiss created issue -
          Michael Weiss made changes -
          Description Original: 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:
          {code:java}
              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>";
              } {code}
           

          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]):
          {code:java}
              // 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>.*)"; {code}
           

          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 "{-}-output-format=parseable --msg-template='\{path}:\{line}: [\\{msg_id}, \\{obj}] \{msg} (\{symbol})'".
          New: 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:
          {code:java}
              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>";
              } {code}
           

          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]):
          {code:java}
              // 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>.*)"; {code}
           

          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:
          {code:java}
          --output-format=parseable --msg-template='{path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})' {code}
           

           
          Michael Weiss made changes -
          Description Original: 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:
          {code:java}
              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>";
              } {code}
           

          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]):
          {code:java}
              // 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>.*)"; {code}
           

          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:
          {code:java}
          --output-format=parseable --msg-template='{path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})' {code}
           

           
          New: 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:
          {code:java}
              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>";
              } {code}
           

          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]):
          {code:java}
              // 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>.*)"; {code}
           

          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:
          {code:java}
          --output-format=parseable --msg-template='{path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})' {code}
          Ulli Hafner made changes -
          Component/s New: analysis-model [ 23523 ]
          Component/s Original: analysis-model-api-plugin [ 24221 ]
          Ulli Hafner made changes -
          Assignee Original: Ulli Hafner [ drulli ]
          Ulli Hafner made changes -
          Labels New: help-wanted newbie-friendly
          Ulli Hafner made changes -
          Remote Link New: This issue links to "PR #933 (Web Link)" [ 28823 ]
          Ulli Hafner made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Ulli Hafner made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Ulli Hafner made changes -
          Assignee New: Michael Weiss [ primeos ]
          Ulli Hafner made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: