-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Consolidate instruction casing lint rules #5046
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a make docs-dockerfile
Also you can delete the doc template under https://github.com/daghack/buildkit/tree/consolidate-case-checks/frontend/dockerfile/linter/docs
https://github.com/moby/buildkit/actions/runs/9550007600/job/26320979434?pr=5046#step:5:380
5e53b3b
to
33742cc
Compare
Signed-off-by: Talon Bowler <[email protected]>
33742cc
to
8cbb98e
Compare
You beat me to it, ty! |
return fmt.Sprintf("Command '%s' should be consistently cased", command) | ||
}, | ||
} | ||
RuleFileConsistentCommandCasing = LinterRule[func(string, string) string]{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not needed yet, but generally I think we need to keep old rules/URLs in here so the docs are still generated for them. Otherwise old client will hit issue, click on a link and get 404
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good thought to bring up, and you're definitely right. There may be a case for adding some sort of Deprecated
flag to the ruleset so that documentation can automatically note it as such as follow-up work.
Currently, there are two lint checks that look at the casing of instructions, but they are largely redundant. This consolidates the two checks into a single casing check.