Skip to content

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