From 7dbf26568fcccde88470e7a25c07f0c7229e85f1 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Tue, 8 Aug 2023 13:50:56 -0700 Subject: [PATCH] ANDROID: Add checkpatch target. Running the following will run scripts/checkpatch.pl on a patch of HEAD tools/bazel run //common:checkpatch or a given Git SHA1: tools/bazel run //common:checkpatch -- --git_sha1 ... For additional flags, see tools/bazel run //common:checkpatch -- --help For details, see build/kernel/kleaf/docs/checkpatch.md in your source tree. Test: TH Bug: 259995152 Change-Id: Iaad8fd69508cf9be11340166aafbb84930d4805c Signed-off-by: Yifan Hong --- BUILD.bazel | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILD.bazel b/BUILD.bazel index 18d496473a44..3fa64fd239ad 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -6,6 +6,7 @@ load("//build/bazel_common_rules/dist:dist.bzl", "copy_to_dist_dir") load("//build/kernel/kleaf:common_kernels.bzl", "define_common_kernels") load( "//build/kernel/kleaf:kernel.bzl", + "checkpatch", "ddk_headers", "kernel_build", "kernel_images", @@ -39,6 +40,11 @@ _GKI_X86_64_MAKE_GOALS = [ "modules", ] +checkpatch( + name = "checkpatch", + checkpatch_pl = "scripts/checkpatch.pl", +) + # Deprecated - Use arch specific files from below. write_file( name = "gki_system_dlkm_modules",