Provide a semantics-only configuration
* configure style rules as warnings
* configure rules that can introduce semantic errors as errors
This commit is contained in:
@@ -43,6 +43,19 @@ It can be chosen using:
|
|||||||
|
|
||||||
yamllint -d relaxed file.yml
|
yamllint -d relaxed file.yml
|
||||||
|
|
||||||
|
There is another pre-defined configuration named ``semantics-only``.
|
||||||
|
As its name suggests, it is more tolerant:
|
||||||
|
|
||||||
|
.. literalinclude:: ../yamllint/conf/semantics-only.yaml
|
||||||
|
:language: yaml
|
||||||
|
|
||||||
|
It can be chosen using:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
yamllint -d semantics-only file.yml
|
||||||
|
|
||||||
|
|
||||||
Extending the default configuration
|
Extending the default configuration
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
|||||||
46
yamllint/conf/semantics-only.yaml
Normal file
46
yamllint/conf/semantics-only.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
braces:
|
||||||
|
level: warning
|
||||||
|
brackets:
|
||||||
|
level: warning
|
||||||
|
colons:
|
||||||
|
level: warning
|
||||||
|
commas:
|
||||||
|
level: warning
|
||||||
|
comments:
|
||||||
|
level: warning
|
||||||
|
comments-indentation:
|
||||||
|
level: warning
|
||||||
|
document-end:
|
||||||
|
level: warning
|
||||||
|
document-start:
|
||||||
|
level: warning
|
||||||
|
empty-lines:
|
||||||
|
level: warning
|
||||||
|
empty-values:
|
||||||
|
level: warning
|
||||||
|
hyphens:
|
||||||
|
level: warning
|
||||||
|
indentation:
|
||||||
|
level: warning
|
||||||
|
key-duplicates: enable
|
||||||
|
key-ordering:
|
||||||
|
level: warning
|
||||||
|
line-length:
|
||||||
|
level: warning
|
||||||
|
new-line-at-end-of-file:
|
||||||
|
level: warning
|
||||||
|
new-lines:
|
||||||
|
level: warning
|
||||||
|
octal-values:
|
||||||
|
level: warning
|
||||||
|
quoted-strings:
|
||||||
|
level: warning
|
||||||
|
trailing-spaces:
|
||||||
|
level: warning
|
||||||
|
truthy:
|
||||||
|
level: error
|
||||||
Reference in New Issue
Block a user