mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-03-01 05:52:11 +00:00
14 lines
294 B
Python
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)
|