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

Support type values that do not contain a dot in CheckStyle parser

    Details

    • Similar Issues:

      Description

      Hadolint is the most common linter for Dockerfiles.
      https://github.com/hadolint/hadolint

      It also supports checkstyle output:

      hadolint Dockerfile -f checkstyle > checkstyle-hadolint.xml
      

      Example hadolint output:

      <?xml version='1.0' encoding='UTF-8'?><checkstyle version='4.3'><file name='Dockerfile' ><error line='13' column='1' severity='warning' message='Pin versions in apk add. Instead of &#96;apk add &#60;package&#62;&#96; use &#96;apk add &#60;package&#62;&#61;&#60;version&#62;&#96;' source='DL3018' /><error line='16' column='1' severity='warning' message='In POSIX sh&#44; set option pipefail is undefined.' source='SC2039' /><error line='16' column='1' severity='warning' message='Set the SHELL option &#45;o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash&#44; or disable this check' source='DL4006' /></file></checkstyle>
      

      This works in general with warnings-ng, but the display of the source attribute is not working as your parser expects a '.' inside. This should have a fallback mechanism to support tools that reuse the checkstyle format.

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment - - edited

          Can you please add or compare the actual and expected result.

          Show
          drulli Ulli Hafner added a comment - - edited Can you please add or compare the actual and expected result.
          Hide
          reitzmichnicht Michael Düsterhus added a comment -

          Expected result would be that warnings-ng displays somewhere the value inside the source attribute like DL4006.

          Actual result see screenshot

          Show
          reitzmichnicht Michael Düsterhus added a comment - Expected result would be that warnings-ng displays somewhere the value inside the source attribute like DL4006. Actual result see screenshot
          Hide
          drulli Ulli Hafner added a comment - - edited

          I see: the source attribute actually is mapped to the type of a warning.

          Show
          drulli Ulli Hafner added a comment - - edited I see: the source attribute actually is mapped to the type of a warning.

            People

            • Assignee:
              Unassigned
              Reporter:
              reitzmichnicht Michael Düsterhus
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: