[JIRA] (JENKINS-60859) hadolint support in checkstyle parser

9 views
Skip to first unread message

reitzmichnicht@gmx.de (JIRA)

unread,
Jan 24, 2020, 5:19:03 AM1/24/20
to jenkinsc...@googlegroups.com
Michael Düsterhus created an issue
 
Jenkins / Improvement JENKINS-60859
hadolint support in checkstyle parser
Issue Type: Improvement Improvement
Assignee: Ulli Hafner
Components: analysis-model
Created: 2020-01-24 10:18
Environment: warnings-ng 7.x
Priority: Major Major
Reporter: Michael Düsterhus

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.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ullrich.hafner@gmail.com (JIRA)

unread,
Jan 24, 2020, 7:25:02 AM1/24/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Improvement JENKINS-60859
 
Re: hadolint support in checkstyle parser
It might help if you would can add or compare the actual and expected result.

ullrich.hafner@gmail.com (JIRA)

unread,
Jan 24, 2020, 7:25:02 AM1/24/20
to jenkinsc...@googlegroups.com
Ulli Hafner updated an issue
 

It might help if you would add or compare the actual and expected result.

ullrich.hafner@gmail.com (JIRA)

unread,
Jan 24, 2020, 7:26:03 AM1/24/20
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Improvement JENKINS-60859
 
Re: hadolint support in checkstyle parser
It might help if Can you can please add or compare the actual and expected result.

ullrich.hafner@gmail.com (JIRA)

unread,
Jan 24, 2020, 7:27:03 AM1/24/20
to jenkinsc...@googlegroups.com
Ulli Hafner assigned an issue to Unassigned
 
Change By: Ulli Hafner
Priority: Major Minor
Labels: help-wanted newbie-friendly
Assignee: Ulli Hafner

reitzmichnicht@gmx.de (JIRA)

unread,
Jan 24, 2020, 8:13:05 AM1/24/20
to jenkinsc...@googlegroups.com
Michael Düsterhus updated an issue
Change By: Michael Düsterhus
Attachment: 2020-01-24 14_11_46-Linting Warnings [Jenkins] - Vivaldi.png

reitzmichnicht@gmx.de (JIRA)

unread,
Jan 24, 2020, 8:13:06 AM1/24/20
to jenkinsc...@googlegroups.com
Michael Düsterhus commented on Improvement JENKINS-60859
 
Re: hadolint support in checkstyle parser

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

Actual result see screenshot

Reply all
Reply to author
Forward
0 new messages