From 5417f9619c03c060b8e689bcb951b9a023650d74 Mon Sep 17 00:00:00 2001 From: James Powis Date: Sat, 13 Jan 2024 20:14:14 -0700 Subject: [PATCH] skip ignored files at discovery ignored files should be skipped early on to prevent other issues such as tripping on intentionally ignored broken symlinks. --- yamllint/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yamllint/cli.py b/yamllint/cli.py index 8d13000a..3a86c426 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -30,7 +30,7 @@ def find_files_recursively(items, conf): for root, _dirnames, filenames in os.walk(item): for f in filenames: filepath = os.path.join(root, f) - if conf.is_yaml_file(filepath): + if conf.is_yaml_file(filepath) and not conf.is_file_ignored(filepath): yield filepath else: yield item