Skip to content

Commit 80a23a5

Browse files
committed
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.
1 parent 556d7d9 commit 80a23a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/scripts/check-files.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def __init__(self):
138138
super().__init__()
139139
self.heading = "TODO present:"
140140
self.files_exemptions = [
141-
__file__, "benchmark.c", "pull_request_template.md"
141+
os.path.basename(__file__),
142+
"benchmark.c",
143+
"pull_request_template.md",
142144
]
143145

144146
def issue_with_line(self, line):

0 commit comments

Comments
 (0)