Enable Android clang-tidy checks for inputflinger
Mostly just adding CLOEXEC to any operations that open a new fd.
Bug: 218657035
Test: build
Change-Id: Iae1a32bfdbb663759fb347af7e3426b03d5f831f
diff --git a/services/inputflinger/Android.bp b/services/inputflinger/Android.bp
index 22a69e5..6c77c8c 100644
--- a/services/inputflinger/Android.bp
+++ b/services/inputflinger/Android.bp
@@ -22,6 +22,10 @@
default_applicable_licenses: ["frameworks_native_license"],
}
+inputflinger_tidy_checks = [
+ "android-*",
+]
+
cc_defaults {
name: "inputflinger_defaults",
cpp_std: "c++20",
@@ -38,6 +42,11 @@
sanitize: {
misc_undefined: ["bounds"],
},
+ tidy: true,
+ tidy_checks: [
+ "-*", // Disable all checks not explicitly enabled for now
+ ] + inputflinger_tidy_checks,
+ tidy_checks_as_errors: inputflinger_tidy_checks,
}
/////////////////////////////////////////////////