Skip to content

Update print=lint output format to be consistent with existing warning output.  #4844

@daghack

Description

@daghack

Follow up to #4761
While use the --debug flag to inspect linting warnings for a Dockerfile, we receive output which is formatted as follows:

 - Lint Rule 'StageNameCasing': Stage name 'buildER' should be lowercase (line 2)
Stage names should be lowercase
Dockerfile:2
--------------------
   1 |     ARG BASE=golang
   2 | >>> FROM $BASE:1.20-alpine AS buildER
   3 |
   4 |     WOrkdIR /go/src/github.com/restic/restic
--------------------

Whereas with the print=lint flag, the same warnings get printed out in a different format:

Lint Rule StageNameCasing
  Dockerfile:2
  Lint Rule 'StageNameCasing': Stage name 'buildER' should be lowercase (line 2)
  2  |  FROM $BASE:1.20-alpine AS buildER

print=lint output should be consistent with the other output of the lint warning, as well as having the rule violations be presented in a consistent order.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions