diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-04-04 17:09:35 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-04-04 16:58:54 +0200 |
commit | fae211c0ae0dd90876a3390eb21449b7b0bb45c4 (patch) | |
tree | 4dca082215b191688e7eb11138ae1e33b3fdfd7f /test/lint/lint-files.py | |
parent | fa82e890e7950fe5ba6d4fa88fcd922cc929dc47 (diff) |
lint: Start to use py lint scripts
Diffstat (limited to 'test/lint/lint-files.py')
-rwxr-xr-x | test/lint/lint-files.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/lint/lint-files.py b/test/lint/lint-files.py index 68b795eef7..3723e0ee6a 100755 --- a/test/lint/lint-files.py +++ b/test/lint/lint-files.py @@ -13,6 +13,7 @@ import sys from subprocess import check_output from typing import Optional, NoReturn +CMD_TOP_LEVEL = ["git", "rev-parse", "--show-toplevel"] CMD_ALL_FILES = "git ls-files -z --full-name" CMD_SOURCE_FILES = 'git ls-files -z --full-name -- "*.[cC][pP][pP]" "*.[hH]" "*.[pP][yY]" "*.[sS][hH]"' CMD_SHEBANG_FILES = "git grep --full-name --line-number -I '^#!'" @@ -184,6 +185,8 @@ def check_shebang_file_permissions() -> int: def main() -> NoReturn: + root_dir = check_output(CMD_TOP_LEVEL).decode("utf8").strip() + os.chdir(root_dir) failed_tests = 0 failed_tests += check_all_filenames() failed_tests += check_source_filenames() |