From 9f876e9eab0c01210dd4d4f036eabdd6525538ac Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Sun, 12 Jun 2022 20:28:00 -0700 Subject: [PATCH] Set NoWarningsAsErrorsInTidyFlags * Reject -warnings-as-errors in the tidy_flags. * Fix one grammar error in comment. Bug: 229801437 Test: WITH_TIDY=1 make; make tidy-soong_subset Change-Id: I4fae229add65131b64cd5a1d06507d27198010ed --- cc/config/tidy.go | 2 +- cc/tidy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/config/tidy.go b/cc/config/tidy.go index c89332067..674edaddd 100644 --- a/cc/config/tidy.go +++ b/cc/config/tidy.go @@ -20,7 +20,7 @@ import ( ) var ( - // Some clang-tidy checks have bugs or not work for Android. + // Some clang-tidy checks have bugs or don't work for Android. // They are disabled here, overriding any locally selected checks. globalNoCheckList = []string{ // https://b.corp.google.com/issues/153464409 diff --git a/cc/tidy.go b/cc/tidy.go index 94b10c2d6..6b5d5728c 100644 --- a/cc/tidy.go +++ b/cc/tidy.go @@ -66,7 +66,7 @@ func (tidy *tidyFeature) props() []interface{} { // Set this const to true when all -warnings-as-errors in tidy_flags // are replaced with tidy_checks_as_errors. // Then, that old style usage will be obsolete and an error. -const NoWarningsAsErrorsInTidyFlags = false +const NoWarningsAsErrorsInTidyFlags = true func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags { CheckBadTidyFlags(ctx, "tidy_flags", tidy.Properties.Tidy_flags)