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
I'm using two if/else expressions in variable section of azure pipeline and yamllint is reporting a key-duplicates.
Is there any way to exclude azure pipeline expressions from linting?
This is not YAML, but a Azure DevOps template that is meant to be compiled into YAML (${{ }} are then replaced with real values).
In general, a YAML linter (either PyYAML or another one) is not able to parse such a language. Here, PyYAML is able to parse the file, but correctly extract two keys with the same name "${{ else }}". It's normal that yamllint reports it: that's what we expect from the rule key-duplicates.
If it's possible to you, I would suggest linting the output of what Azure DevOps generates (that should be valid YAML), rather than the source format.
Liniting output is to late task. We are developing Azure Pipelines and want to validate during a CI stage.
I understand that the file is not a strict YAML format. But we are using yamlint because this is the best what we can get. From my perspective it would be better to be able tweak yamllint instead building, even on top of it, a new tool.
I'm using two if/else expressions in variable section of azure pipeline and yamllint is reporting a key-duplicates.
Is there any way to exclude azure pipeline expressions from linting?
Same problem was described in this issue super-linter/super-linter#3335
Provided solution, to placing a
# yamllint disable-line
at line above, is not very elegant.The text was updated successfully, but these errors were encountered: