mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
parent
8da98f2122
commit
d274543b72
@ -2,7 +2,17 @@ Development
|
|||||||
===========
|
===========
|
||||||
|
|
||||||
yamllint provides both a script and a Python module. The latter can be used to
|
yamllint provides both a script and a Python module. The latter can be used to
|
||||||
write your own linting tools:
|
write your own linting tools.
|
||||||
|
|
||||||
|
Basic example of running the linter from Python:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
import yamllint
|
||||||
|
|
||||||
|
yaml_config = yamllint.config.YamlLintConfig("extends: default")
|
||||||
|
for p in yamllint.linter.run("example.yaml", yaml_config):
|
||||||
|
print(p.desc, p.line, p.rule)
|
||||||
|
|
||||||
.. automodule:: yamllint.linter
|
.. automodule:: yamllint.linter
|
||||||
:members:
|
:members:
|
||||||
|
Loading…
Reference in New Issue
Block a user