Page MenuHomePhabricator

Support multiple documents in yamlllint
Closed, DeclinedPublic

Description

Example:

https://github.com/wikimedia/translatewiki/blob/e90354d89c503d2778fa61516d9c6f062f56a4ec/groups/Blockly/Blockly.yaml

These have multiple Yaml objects in one file separated by ---. Either fine a way to validate these, or help translatewiki convert them to a single object. I'd recommend the latter as that would probably simplify their logic as well. But I'm open to supporting it if they like it this way.

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle added subscribers: Krinkle, Nikerabbit, hashar.

Change 183522 had a related patch set uploaded (by Krinkle):
Disable translatewiki-yamllint

https://gerrit.wikimedia.org/r/183522

Patch-For-Review

Change 183522 merged by jenkins-bot:
Disable translatewiki-yamllint

https://gerrit.wikimedia.org/r/183522

The tools/yamlllint does not use safe_load_all() because it does not raise an exception when one of the document is invalid. It probably needs an extra checks to validate each document.

Nikerabbit removed a project: Patch-For-Review.
Nikerabbit set Security to None.

Change 191881 had a related patch set uploaded (by Hashar):
Remove yamllint jobs

https://gerrit.wikimedia.org/r/191881

Patch-For-Review

hashar claimed this task.

I am phasing out our python based yaml linter. Instead you should write a test using the yaml language implementation you want to use. That is much easier to delegate that linting/test task to developers instead of having CI to try to match all possible use cases.

Change 203827 had a related patch set uploaded (by Hashar):
Remove commented out yamllint from translatewiki

https://gerrit.wikimedia.org/r/203827

Phase out of the yamllint generic job is tracked by T95890: Phase out yamllint jobs.

Change 203827 merged by jenkins-bot:
Remove commented out yamllint from translatewiki

https://gerrit.wikimedia.org/r/203827