From 307db79ca2594f66e58c558d0acc7ab33ca48401 Mon Sep 17 00:00:00 2001 From: Dafydd Jones Date: Mon, 13 Nov 2023 15:29:42 +0000 Subject: [PATCH] feat: identify `.salt-lint` as YAML * "Salt-lint supports local configuration via a .salt-lint configuration file" ref. https://github.com/warpnet/salt-lint/blob/main/docs/index.md#configuration-file --- identify/extensions.py | 1 + tests/identify_test.py | 1 + 2 files changed, 2 insertions(+) diff --git a/identify/extensions.py b/identify/extensions.py index 544af49..0a87cb9 100644 --- a/identify/extensions.py +++ b/identify/extensions.py @@ -328,6 +328,7 @@ '.prettierignore': {'text', 'gitignore', 'prettierignore'}, '.pypirc': EXTENSIONS['ini'] | {'pypirc'}, '.rstcheck.cfg': EXTENSIONS['ini'], + '.salt-lint': EXTENSIONS['yaml'] | {'salt-lint'}, '.yamllint': EXTENSIONS['yaml'] | {'yamllint'}, '.zlogin': EXTENSIONS['zsh'], '.zlogout': EXTENSIONS['zsh'], diff --git a/tests/identify_test.py b/tests/identify_test.py index ac458df..b81e48f 100644 --- a/tests/identify_test.py +++ b/tests/identify_test.py @@ -151,6 +151,7 @@ def test_tags_from_path_plist_text(tmpdir): @pytest.mark.parametrize( ('filename', 'expected'), ( + ('.salt-lint', {'text', 'salt-lint', 'yaml'}), ('test.py', {'text', 'python'}), ('test.mk', {'text', 'makefile'}), ('Makefile', {'text', 'makefile'}),