From c1d1b669dbf09cdfb33121a4f86de486a2423f14 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sun, 10 May 2020 16:54:10 +0200 Subject: [PATCH] Check all files by default Have an explicit list of exemptions for specific checks rather than whitelisting files to check. Some checks, such as permissions, should apply to all files. Signed-off-by: Gilles Peskine --- tests/scripts/check-files.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/scripts/check-files.py b/tests/scripts/check-files.py index 594e0225e..6bb61e6cd 100755 --- a/tests/scripts/check-files.py +++ b/tests/scripts/check-files.py @@ -223,24 +223,6 @@ class IntegrityChecker: self.check_repo_path() self.logger = None self.setup_logger(log_file) - self.extensions_to_check = ( - ".bat", - ".c", - ".data", - ".dsp", - ".function", - ".h", - ".md", - ".pl", - ".py", - ".sh", - ".sln", - ".vcxproj", - "/CMakeLists.txt", - "/ChangeLog", - "/Makefile", - "/Makefile.inc", - ) self.excluded_directories = [ '.git', 'mbed-os', @@ -287,8 +269,6 @@ class IntegrityChecker: dirs[:] = sorted(d for d in dirs if not self.prune_branch(root, d)) for filename in sorted(files): filepath = os.path.join(root, filename) - if not filepath.endswith(self.extensions_to_check): - continue for issue_to_check in self.issues_to_check: if issue_to_check.should_check_file(filepath): issue_to_check.check_file_for_issue(filepath)