add note for json-output

This commit is contained in:
Roman v. Gemmeren
2020-03-31 13:11:01 +02:00
parent d167f4556e
commit 7bbc2e60e4

View File

@@ -101,6 +101,25 @@ machine (for instance for :doc:`syntax highlighting in text editors
file.yml:57:1: [error] trailing spaces (trailing-spaces)
file.yml:60:3: [error] wrong indentation: expected 4 but found 2 (indentation)
Add the ``-f json`` arguments if you need an output formatted as json.
The output will then look like:
::
[
{
"path": "file.yml",
"line": 6,
"char": 2,
"description": "[warning] missing starting space in comment (comments)",
"code": "yamllint",
"name": "yamllint",
"severity": "warning"
}
]
If you have a custom linting configuration file (see :doc:`how to configure
yamllint <configuration>`), it can be passed to yamllint using the ``-c``
option: