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

Update PrintLintViolations output #4992

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

daghack
Copy link
Collaborator

@daghack daghack commented Jun 4, 2024

Updates the output of the PrintLintViolations to begin with the violation rule name, print the ULR inline to the name if it exists, and remove the printing of the Detail field, which is redundant when printing the Description.

Old:

- 'as' and 'FROM' keywords' casing do not match
The 'as' keyword should match the case of the 'from' keyword
Dockerfile:1
--------------------
   1 | >>> FROM scratch as base
   2 |     copy Dockerfile .
   3 |
--------------------

- Command 'copy' should match the case of the command majority (uppercase)
All commands within the Dockerfile should use the same casing (either upper or lower)
Dockerfile:2
--------------------
   1 |     FROM scratch as base
   2 | >>> copy Dockerfile .
   3 |
   4 |
--------------------

Updated:

FromAsCasing
The 'as' keyword should match the case of the 'from' keyword
Dockerfile:1
--------------------
   1 | >>> FROM scratch as base
   2 |     copy Dockerfile \
   3 |
--------------------

NoEmptyContinuations - https://github.com/moby/moby/pull/33719
Empty continuation lines will become errors in a future release
Dockerfile:4
--------------------
   2 |     copy Dockerfile \
   3 |
   4 | >>> .
   5 |     copy .dockerignore .
   6 |
--------------------

Signed-off-by: Talon Bowler <talon.bowler@docker.com>
@tonistiigi tonistiigi merged commit f9b730c into moby:master Jun 5, 2024
73 checks passed
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.

None yet

2 participants