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

adds InvalidDefaultArgInFrom lint check #5113

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

daghack
Copy link
Collaborator

@daghack daghack commented Jul 2, 2024

Picks up the work left off here: #5102

@daghack daghack marked this pull request as draft July 2, 2024 18:52
@thompson-shaun thompson-shaun added this to the v0.15.0 milestone Jul 2, 2024
@thompson-shaun
Copy link
Collaborator

Updates moved here @dvdksn 👍

@daghack daghack force-pushed the invalid-default-arg-in-from branch 2 times, most recently from 05ec57f to 57a3752 Compare July 2, 2024 19:33
@daghack daghack marked this pull request as ready for review July 2, 2024 19:47
@daghack daghack marked this pull request as draft July 2, 2024 20:06
@daghack daghack force-pushed the invalid-default-arg-in-from branch from 57a3752 to 69d6d4d Compare July 2, 2024 20:10
@daghack daghack self-assigned this Jul 2, 2024
@daghack daghack marked this pull request as ready for review July 2, 2024 20:45
frontend/dockerfile/dockerfile_lint_test.go Show resolved Hide resolved
Name: "InvalidDefaultArgInFrom",
Description: "Using ARG with default value results in an empty or invalid base image name",
URL: "https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/",
Format: func(baseName string) string {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it would be a bit more user-friendly if we would detect here if the base image is invalid or empty and show a message that is precise to the current condition. In case of "invalid image" we could also show what that invalid image name is.

@tonistiigi
Copy link
Member

@daghack Needs squash + rebase

@daghack daghack force-pushed the invalid-default-arg-in-from branch from 18578ef to 8bcc375 Compare July 3, 2024 18:21
@daghack
Copy link
Collaborator Author

daghack commented Jul 3, 2024

@tonistiigi As soon as tests pass, it should be good to go :)

@thompson-shaun thompson-shaun merged commit 8ade9b2 into moby:master Jul 3, 2024
75 checks passed
@daghack daghack deleted the invalid-default-arg-in-from branch July 3, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants