scripts: ci: compliance: ClangFormat only check .c/.h files

The clang format compliance check should only be applied to .c and .h
files.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-08-14 19:34:30 +02:00 committed by Anas Nashif
commit dde46a94ba

View file

@ -274,6 +274,9 @@ class ClangFormatCheck(ComplianceTest):
def run(self):
for file in get_files():
if Path(file).suffix not in ['.c', '.h']:
continue
diff = subprocess.Popen(('git', 'diff', '-U0', '--no-color', COMMIT_RANGE, '--', file),
stdout=subprocess.PIPE,
cwd=GIT_TOP)