Enable Android.bp format validation hook
Fix the current format of Android.bp and enable the hook for
presubmit.
Test: bpfmt -d Android.bp
Change-Id: I3496b43093aa7f7633ca64e587e128c45b534601
diff --git a/Android.bp b/Android.bp
index 5e99b47..a9bd385 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,7 +14,10 @@
// limitations under the License.
//
-subdirs = ["test", "tools"]
+subdirs = [
+ "test",
+ "tools",
+]
cc_defaults {
name: "avb_defaults",
@@ -243,7 +246,8 @@
name: "libavb_aftl",
defaults: [
"avb_defaults",
- "avb_sources"],
+ "avb_sources",
+ ],
host_supported: true,
recovery_available: true,
header_libs: ["avb_headers"],
@@ -252,9 +256,9 @@
"-fno-stack-protector",
],
srcs: [
- "libavb_aftl/avb_aftl_util.c",
- "libavb_aftl/avb_aftl_validate.c",
- "libavb_aftl/avb_aftl_verify.c",
+ "libavb_aftl/avb_aftl_util.c",
+ "libavb_aftl/avb_aftl_validate.c",
+ "libavb_aftl/avb_aftl_verify.c",
],
}
@@ -269,13 +273,19 @@
srcs: [
"test/avb_aftl_fuzz.cc",
],
- static_libs: ["libavb", "libavb_aftl"],
+ static_libs: [
+ "libavb",
+ "libavb_aftl",
+ ],
host_supported: true,
corpus: ["test/corpus/*"],
fuzz_config: {
- cc: ["tweek@google.com", "jpm@google.com"],
+ cc: [
+ "tweek@google.com",
+ "jpm@google.com",
+ ],
componentid: 685985,
- }
+ },
}
cc_library_host_static {
@@ -342,8 +352,8 @@
"libcrypto",
],
cflags: [
- "-Wno-missing-prototypes",
- "-DAVB_AB_I_UNDERSTAND_LIBAVB_AB_IS_DEPRECATED",
+ "-Wno-missing-prototypes",
+ "-DAVB_AB_I_UNDERSTAND_LIBAVB_AB_IS_DEPRECATED",
],
srcs: [
"test/avb_ab_flow_unittest.cc",
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 5789f69..0e19284 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,4 +1,5 @@
[Builtin Hooks]
+bpfmt = true
clang_format = true
pylint = true