Yamllint: Allow to customize settings

Move default settings from template to .yamllint_defaults.yml and allow
customizations in .yamllint.yml.
This commit is contained in:
Rich Megginson 2020-03-31 09:33:37 -06:00 committed by Till Maas
parent b5ae5380ad
commit d6196106a8
2 changed files with 29 additions and 12 deletions

View file

@ -1,14 +1,17 @@
# SPDX-License-Identifier: MIT
---
ignore: |
/.tox/
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
truthy: disable
document-start: disable
extends: .yamllint_defaults.yml
# possible customizations over the base yamllint config
# skip the yaml files in the /tests/ directory
# NOTE: If you want to customize `ignore` you'll have to
# copy in all of the config from .yamllint.yml, then
# add your own - so if you want to just add /tests/ to
# be ignored, you'll have to add the ignores from the base
# ignore: |
# /tests/
# /.tox/
# skip checking line length
# NOTE: the above does not apply to `rules` - you do not
# have to copy all of the rules from the base config
# rules:
# line-length: disable

14
.yamllint_defaults.yml Normal file
View file

@ -0,0 +1,14 @@
# SPDX-License-Identifier: MIT
---
ignore: |
/.tox/
extends: default
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
truthy: disable
document-start: disable