feat: Support reading config from .yamllint.yml and .yamllint.yaml

Signed-off-by: Ibrahim AshShohail <me@ibrasho.com>
This commit is contained in:
Ibrahim AshShohail
2019-08-25 20:11:42 +03:00
committed by Adrien Vergé
parent b62b424dd4
commit 881d301883
2 changed files with 6 additions and 1 deletions

View File

@@ -154,6 +154,10 @@ def run(argv=None):
conf = YamlLintConfig(file=args.config_file)
elif os.path.isfile('.yamllint'):
conf = YamlLintConfig(file='.yamllint')
elif os.path.isfile('.yamllint.yaml'):
conf = YamlLintConfig(file='.yamllint.yaml')
elif os.path.isfile('.yamllint.yml'):
conf = YamlLintConfig(file='.yamllint.yml')
elif os.path.isfile(user_global_config):
conf = YamlLintConfig(file=user_global_config)
else: