-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
warnings-ng 7.x
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 `apk add <package>` use `apk add <package>=<version>`' source='DL3018' /><error line='16' column='1' severity='warning' message='In POSIX sh, set option pipefail is undefined.' source='SC2039' /><error line='16' column='1' severity='warning' message='Set the SHELL option -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, 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.
[JENKINS-60859] Support type values that do not contain a dot in CheckStyle parser
Assignee | Original: Ulli Hafner [ drulli ] | |
Labels | New: help-wanted newbie-friendly | |
Priority | Original: Major [ 3 ] | New: Minor [ 4 ] |
Attachment | New: 2020-01-24 14_11_46-Linting Warnings [Jenkins] - Vivaldi.png [ 50034 ] |
Issue Type | Original: Improvement [ 4 ] | New: Bug [ 1 ] |
Summary | Original: hadolint support in checkstyle parser | New: Support type values that do not contain a dot in CheckStyle parser |
Labels | Original: help-wanted newbie-friendly | New: help-wanted newbie-friendly testing-course |
Rank | New: Ranked higher |
Rank | New: Ranked lower |
Labels | Original: help-wanted newbie-friendly testing-course | New: help-wanted newbie-friendly |
URL | New: https://github.com/jenkinsci/analysis-model/pull/535 | |
Assignee | New: Ulli Hafner [ drulli ] | |
Labels | Original: help-wanted newbie-friendly |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Fixed but Unreleased [ 10203 ] |
Released As | New: https://github.com/jenkinsci/analysis-model/releases/tag/v9.4.0 | |
Status | Original: Fixed but Unreleased [ 10203 ] | New: Resolved [ 5 ] |