Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a semantics-only configuration #219

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ It can be chosen using:

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to simplify all this to something like:

If you want yamllint to only report syntax errors, use the pre-defined
configuration named ``syntax-only``:


.. code:: bash

 yamllint -d syntax-only file.yaml



Extending the default configuration
-----------------------------------

Expand Down
46 changes: 46 additions & 0 deletions yamllint/conf/semantics-only.yaml
Original file line number Diff line number Diff line change
@@ -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