diff options
author | Erik Staats <estaats@google.com> | 2024-02-22 18:35:08 +0000 |
---|---|---|
committer | Matthias Männich <maennich@google.com> | 2024-02-23 08:51:46 +0000 |
commit | 1110242616a154ec2858d8a56afad1ed1912dc4b (patch) | |
tree | 9f85c43410d50d2707d8a0c8cfe9d39df19fe33b | |
parent | 6ac52c2f183afff8648f41be4ffc2644c2e87178 (diff) | |
download | build-1110242616a154ec2858d8a56afad1ed1912dc4b.tar.gz |
kleaf: checkpatch_presubmit: Add full checkpatch log
Add a full checkpatch run that ignores nothing but doesn't fail on any
violations. This will be used by an AyeAye analyzer that analyzes
checkpatch violations.
Bug: 321067108
Test: Verified checkpatch_full.log file is generated with all
violations.
Change-Id: Iaad7a6368807c078b8f6461e807af1e9c538657e
Signed-off-by: Erik Staats <estaats@google.com>
(cherry picked from commit f25e1ffb33962382b15d468c19d5651eb2df40d2)
-rw-r--r-- | static_analysis/checkpatch_presubmit_bazel.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/static_analysis/checkpatch_presubmit_bazel.py b/static_analysis/checkpatch_presubmit_bazel.py index 143a20ae..6097a40f 100644 --- a/static_analysis/checkpatch_presubmit_bazel.py +++ b/static_analysis/checkpatch_presubmit_bazel.py @@ -143,8 +143,11 @@ def main( targets.append((path_targets, git_sha1_list[0])) checkpatch_log = dist_dir / "checkpatch.log" + checkpatch_full_log = dist_dir / "checkpatch_full.log" if checkpatch_log.exists(): os.unlink(checkpatch_log) + if checkpatch_full_log.exists(): + os.unlink(checkpatch_full_log) return_codes = [] for path_targets, git_sha1 in targets: for target in path_targets: @@ -154,6 +157,12 @@ def main( log=checkpatch_log, checkpatch_args=checkpatch_args, )) + _run_checkpatch( + target=target, + git_sha1=git_sha1, + log=checkpatch_full_log, + checkpatch_args=checkpatch_args + ["--ignored_checks", ""], + ) success = sum(return_codes) == 0 |