From e49f56a96dac680aeab1ab55781bfb46325cc298 Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Thu, 3 Feb 2022 20:50:52 +0800 Subject: [PATCH] tools: Check copyright now checks assembly files This commit updates the pre-commit configuration and check copyright script to check assembly files (extensions '.s' and '.S'). --- .pre-commit-config.yaml | 2 +- tools/ci/check_copyright.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e401a155ee..d7585f5789 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -109,7 +109,7 @@ repos: - 'pyyaml == 5.4.1' - 'pathspec == 0.9.0' language: python - files: \.(py|c|h|cpp|hpp|ld)$ + files: \.(py|c|h|cpp|hpp|ld|s|S)$ require_serial: true - id: check-tools-files-patterns name: Check tools dir files patterns diff --git a/tools/ci/check_copyright.py b/tools/ci/check_copyright.py index 29e69a59bf..b659397e83 100755 --- a/tools/ci/check_copyright.py +++ b/tools/ci/check_copyright.py @@ -188,7 +188,7 @@ def get_file_mime(fn: str) -> str: return MIME['python'] if fn.endswith(('.cpp', '.hpp')): return MIME['cpp'] - if fn.endswith(('.c', '.h', '.ld')): + if fn.endswith(('.c', '.h', '.ld', '.s', '.S')): return MIME['c'] raise UnsupportedFileType(fn)