scripts: ci: check_compliance: ignore patch and diff files
Was getting several false positives about whitespace at line endings with check_compliance.py because it was analyzing .patch and .diff files as source. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
parent
651ecab53e
commit
305e648d63
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ class CheckPatch(ComplianceTest):
|
|||
cmd = [checkpatch]
|
||||
|
||||
cmd.extend(['--mailback', '--no-tree', '-'])
|
||||
diff = subprocess.Popen(('git', 'diff', '--no-ext-diff', COMMIT_RANGE),
|
||||
diff = subprocess.Popen(('git', 'diff', '--no-ext-diff', '--', ':!*.diff', ':!*.patch', COMMIT_RANGE),
|
||||
stdout=subprocess.PIPE,
|
||||
cwd=GIT_TOP)
|
||||
try:
|
||||
|
@ -1327,7 +1327,7 @@ class GitDiffCheck(ComplianceTest):
|
|||
for shaidx in get_shas(COMMIT_RANGE):
|
||||
# Ignore non-zero return status code
|
||||
# Reason: `git diff --check` sets the return code to the number of offending lines
|
||||
diff = git("diff", f"{shaidx}^!", "--check", ignore_non_zero=True)
|
||||
diff = git("diff", f"{shaidx}^!", "--check", "--", ":!*.diff", ":!*.patch", ignore_non_zero=True)
|
||||
|
||||
lines = p.findall(diff)
|
||||
lines = map(lambda x: f"{shaidx}: {x}", lines)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue