From d6196106a826780efe569178cc693925c48be3ce Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Tue, 31 Mar 2020 09:33:37 -0600 Subject: [PATCH] Yamllint: Allow to customize settings Move default settings from template to .yamllint_defaults.yml and allow customizations in .yamllint.yml. --- .yamllint.yml | 27 +++++++++++++++------------ .yamllint_defaults.yml | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 .yamllint_defaults.yml diff --git a/.yamllint.yml b/.yamllint.yml index ae5f8c0d..5ff3fd50 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -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 diff --git a/.yamllint_defaults.yml b/.yamllint_defaults.yml new file mode 100644 index 00000000..ae5f8c0d --- /dev/null +++ b/.yamllint_defaults.yml @@ -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