From 37f450940760d2318d829c611662e3e4ff35af7b 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 (cherry picked from commit 7dbf26568fcccde88470e7a25c07f0c7229e85f1) --- BUILD.bazel | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILD.bazel b/BUILD.bazel index 2a95ec15d4d2..a9f5348d052e 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_abi", "kernel_build", @@ -40,6 +41,11 @@ _GKI_X86_64_MAKE_GOALS = [ "modules", ] +checkpatch( + name = "checkpatch", + checkpatch_pl = "scripts/checkpatch.pl", +) + write_file( name = "gki_system_dlkm_modules", out = "android/gki_system_dlkm_modules",