You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a question rather than an issue report, and depending on the answer it might become a feature request...
Is it possible to get yamllint to check for and enforce YAML 1.2?
We would like to make sure that all our files follow YAML spec version 1.2. Can yamllint help us enforce this in some way? Maybe check for the presence of the %YAML 1.2 directive or maybe get yamllint to output an error if the file is not YAML 1.2 conform. We just started using yamllint so we might have just not found out how to do this yet.
The text was updated successfully, but these errors were encountered:
In general yamllint tries to enforce YAML 1.2, but it's not 100% consistent, mainly because of its YAML parser (PyYAML) and because some rules support both depending on what it detects (e.g. #650).
If you just want to check for the presence of the directive %YAML 1.2, a new rule could be implemented.
Otherwise, it really depends on what you mean by "enforce YAML 1.2": do you have a concrete example?
If you just want to check for the presence of the directive %YAML 1.2, a new rule could be implemented.
I feel like such a rule would be useful for us.
some rules support both depending on what it detects
Exactly, we want to make sure that yamllint is not assuming YAML 1 when what we want is YAML 1.2. Sometimes we forget to place the %YAML 1.2 directive, so we do not know for sure what version yamllint is assuming. Having the rule mentioned above would remove the uncertainty, wouldn't it? Does that make sense?
This is a question rather than an issue report, and depending on the answer it might become a feature request...
Is it possible to get yamllint to check for and enforce YAML 1.2?
We would like to make sure that all our files follow YAML spec version 1.2. Can yamllint help us enforce this in some way? Maybe check for the presence of the
%YAML 1.2
directive or maybe get yamllint to output an error if the file is not YAML 1.2 conform. We just started using yamllint so we might have just not found out how to do this yet.The text was updated successfully, but these errors were encountered: