[cleanup] Enable clang-tidy and fix warnings
Moving out of a const variable doesn't really work, apparently
Bug: 153704006
Test: builds & boots
Change-Id: Id7322f7045c08a20d72dda50808c0be427064cdd
diff --git a/services/incremental/Android.bp b/services/incremental/Android.bp
index b8bd3b4..de639c5 100644
--- a/services/incremental/Android.bp
+++ b/services/incremental/Android.bp
@@ -19,6 +19,21 @@
proto: {
type: "lite",
},
+ tidy: true,
+ tidy_checks: [
+ "android-*",
+ "cert-*",
+ "clang-analyzer-security*",
+ "-cert-err34-c",
+ "clang-analyzer-security*",
+ // Disabling due to many unavoidable warnings from POSIX API usage.
+ "-google-runtime-int",
+ "-google-explicit-constructor",
+ // do not define variadic C function - JNI headers
+ "-cert-dcl50-cpp",
+ // operator=() does not handle self-assignment properly - all protobuf-generated classes
+ "-cert-oop54-cpp",
+ ],
}
cc_defaults {