Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Junit Warning/Info #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julienhuon
Copy link

@julienhuon julienhuon commented Oct 15, 2021

Hi,

When you're using the JUnit output, INFOs are displayed as WARNINGs and the WARNINGs as INFOs.

Here an example.

The Dockerfile:

FROM node:12

LABEL Name='test'
LABEL Version='1.0'

The classical output:

# Analyzing Dockerfile


--------INFO---------

INFO: There is no 'EXPOSE' instruction. Without exposed ports how will the service of the container be accessed?. 
Reference -> https://docs.docker.com/engine/reference/builder/#expose


INFO: There is no 'CMD' instruction. None. 
Reference -> https://docs.docker.com/engine/reference/builder/#cmd

The Junit ouput:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="dockerfile_lint" tests="2" failures="2" errors="0" skipped="0">
    <testcase classname="WARNING" name="There is no 'EXPOSE' instruction">
      <failure message="There is no 'EXPOSE' instruction. Without exposed ports how will the service of the container be accessed? | Reference -> https://docs.docker.com/engine/reference/builder/#expose"/>
    </testcase>
    <testcase classname="WARNING" name="There is no 'CMD' instruction">
      <failure message="There is no 'CMD' instruction. None | Reference -> https://docs.docker.com/engine/reference/builder/#cmd"/>
    </testcase>
  </testsuite>
</testsuites>

This PR fixes the problem.

Regards,
Julien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant