From 715dd1073bc060f4ee221e2e74770f5728e7b8a0 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 28 Sep 2023 12:08:17 +0200 Subject: [PATCH] Only lint js and json files CheckFileName is the only one that could arguably be valid for other files, but it doesn't seem worth the complexity to run it. --- tools/lint/lint.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lint/lint.py b/tools/lint/lint.py index 03f59a7f36..81780d6e8b 100755 --- a/tools/lint/lint.py +++ b/tools/lint/lint.py @@ -72,6 +72,9 @@ def lint(file_names): errors = dict() for file_name in file_names: + if not file_name.endswith((".js", ".json")): + continue + with open(file_name, 'r') as f: content = f.read() meta = lib.frontmatter.parse(content)