-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
LegacyKeyValueFormat
linter is noisy with very little practical value
#5130
Comments
The syntax is deprecated and discouraged (since 2020). We should either remove the deprecation or we should warn. I don't see any point of deprecating but then still saying "it is fine, keep using it". If there are many Dockerfiles that use the deprecated syntax 4 years later, that is a sign that nobody follows the deprecation documentation, and if we want to change user's behavior, we need to tell them that they are using a deprecated command. Personally, I tend to agree with the justification for deprecation. In addition to ambiguous cases:
It is only shown until you fix it one time. There is a |
Yes, I agree with your first point -- I argued against the deprecation back in 2020, and still do think we should reverse course on it because I still think it's a net negative. "It's more consistent with The way I see the "multiple ways to do the same thing" argument is no different than shell vs JSON syntax. It's a little hiccup for new users, but experienced users learn quickly. I do think there is value in having a warning for cases like |
But we did add a check for that as well. While non-JSON is allowed from CMD/ENTRYPOINT we now warn against it and ask user to only use JSON. |
And |
At the risk of being a broken record, I still firmly believe it is a mistake to even attempt to deprecate the
ENV key value
syntax in favor of only supportingENV key=value
. Parsing the former is much simpler, and more in line with the way otherDockerfile
instructions are parsed (and have been parsed historically). It is also much easier to generate from other code correctly and safely. As I noted on that other issue, if there are cases where the behavior of the former is ambiguous, that should be the thing we detect and warn about, not just trying to deprecate the entire syntax.For the current linting rule, I would propose that it either be removed or somehow disabled by default, as it is causing unnecessary and noisy churn across the industry with very little practical benefit. 🙇 ❤️
Examples of unnecessary churn/noise:
=
instead of whitespace as the key value separator nginxinc/docker-nginx#906LegacyKeyValueFormat
warnings docker-library/ruby#465The text was updated successfully, but these errors were encountered: