From 80a23a5bc4d14e03f02fc3f4a3ba60ced179d85d Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Fri, 23 Nov 2018 10:33:20 +0000 Subject: [PATCH] check-files: Don't check same-named files The check-files script contains the strings "TODO" and "todo" in order to search for files that contain TODO items. So, any check-files script would need to be excluded from the list of files that gets checked for "TODO". Normally, the script excludes itself from checks, but with the addition of the crypto submodule, there is another copy of the script present from the project root. We must avoid checking check-files scripts for TODO items. This also helps if you run check-files from another working tree in your working tree. --- tests/scripts/check-files.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/scripts/check-files.py b/tests/scripts/check-files.py index ed6787289..e4339b1b5 100755 --- a/tests/scripts/check-files.py +++ b/tests/scripts/check-files.py @@ -138,7 +138,9 @@ class TodoIssueTracker(IssueTracker): super().__init__() self.heading = "TODO present:" self.files_exemptions = [ - __file__, "benchmark.c", "pull_request_template.md" + os.path.basename(__file__), + "benchmark.c", + "pull_request_template.md", ] def issue_with_line(self, line):