From e1ea9434c11f0074738dd78e22b7e017c7d2821f Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 11 May 2016 13:39:48 -0700 Subject: [PATCH] Add misc-macro-parentheses to default tidy checks. * Disable this check in external projects. Bug: 28705665 Change-Id: Ia44a15765fd637dae36b5e0f2b59ee4280b139c9 --- core/clang/tidy.mk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/clang/tidy.mk b/core/clang/tidy.mk index e61b87852..019e6f029 100644 --- a/core/clang/tidy.mk +++ b/core/clang/tidy.mk @@ -15,22 +15,25 @@ # # Most Android source files are not clang-tidy clean yet. -# Global tidy checks include only google* minus google-readability*. +# Global tidy checks include only google* and misc-macro-parentheses, +# but not google-readability*. DEFAULT_GLOBAL_TIDY_CHECKS := \ - -*,google*,-google-readability* + -*,google*,-google-readability*,misc-macro-parentheses -# Disable google style rules usually not followed by external projects. +# Disable style rules usually not followed by external projects. # Every word in DEFAULT_LOCAL_TIDY_CHECKS list has the following format: # :, # The tidy-check-patterns of all matching local_path_prefixes will be used. # For example, external/google* projects will have: # ,-google-build-using-namespace,-google-explicit-constructor -# ,-google-runtime-int,google-runtime-int -# where google-runtime-int is enabled at the end. +# ,-google-runtime-int,-misc-macro-parentheses, +# ,google-runtime-int,misc-macro-parentheses +# where google-runtime-int and misc-macro-parentheses are enabled at the end. DEFAULT_LOCAL_TIDY_CHECKS := \ external/:,-google-build-using-namespace \ external/:,-google-explicit-constructor,-google-runtime-int \ - external/google:,google-runtime-int \ + external/:,-misc-macro-parentheses \ + external/google:,google-runtime-int,misc-macro-parentheses \ external/webrtc/:,google-runtime-int \ hardware/qcom:,-google-build-using-namespace \ hardware/qcom:,-google-explicit-constructor,-google-runtime-int \