From e5849e8915dda85459c6ef5aa977faaca3f94e7a Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sat, 13 Jan 2024 15:51:52 +0100 Subject: [PATCH] Ignore symlinks early on, before following them --- yamllint/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yamllint/cli.py b/yamllint/cli.py index 8d13000a..19a86c7c 100644 --- a/yamllint/cli.py +++ b/yamllint/cli.py @@ -217,6 +217,8 @@ def run(argv=None): for file in find_files_recursively(args.files, conf): filepath = file[2:] if file.startswith('./') else file + if conf.is_file_ignored(filepath): + continue try: with open(file, newline='') as f: problems = linter.run(f, conf, filepath)