Files
rpi-buildroot/support/testing/tests/package/sample_python_yamllint.py
Heiko Thiery 2258fc413a package/python-yamllint: new package
This host package is needed since u-boot 2024.04 for building ti defconfigs.

This is an requirement for using buildman/binman [1].

[1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.04/tools/buildman/requirements.txt?ref_type=tags#L3

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-04-12 17:48:46 +02:00

14 lines
294 B
Python

# example form https://yamllint.readthedocs.io/en/stable/development.html
from yamllint import (config, linter)
data = '''---
- &anchor
foo: bar
- *anchor
'''
yaml_config = config.YamlLintConfig("extends: default")
for p in linter.run(data, yaml_config):
print(p.desc, p.line, p.rule)