From 8fdda6e495dbb290e436195b5b386ecd30490246 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Sun, 2 Oct 2016 21:31:04 -0700 Subject: [PATCH] Accept environment variables DEFAULT_*_TIDY_CHECKS * Define DEFAULT_GLOBAL_TIDY_CHECKS/DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS only if it is not already defined. Bug: http://b/27779618 Test: build with WITH_TIDY=1 and define those variables. Change-Id: I201c9da3769d6ef658a75d4a1bf42ec6816d4069 --- core/clang/tidy.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/clang/tidy.mk b/core/clang/tidy.mk index c1d485d6e..58ecd0748 100644 --- a/core/clang/tidy.mk +++ b/core/clang/tidy.mk @@ -18,7 +18,7 @@ # Global tidy checks include only google*, performance*, # and misc-macro-parentheses, but not google-readability* # or google-runtime-references. -DEFAULT_GLOBAL_TIDY_CHECKS := \ +DEFAULT_GLOBAL_TIDY_CHECKS ?= \ $(subst $(space),, \ -*,google* \ ,misc-macro-parentheses \ @@ -29,7 +29,7 @@ DEFAULT_GLOBAL_TIDY_CHECKS := \ # There are too many clang-tidy warnings in external and vendor projects. # Enable only some google checks for these projects. -DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS := \ +DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS ?= \ $(subst $(space),, \ -*,google* \ ,-google-build-using-namespace \ -- 2.11.0