Merge "Add support for clang-tidy -warnings-as-errors in Android.bp files" am: ca57e57837
am: cc92d0203f
am: cf2c651116
Change-Id: Ia68ea717db13cf10d6a5c4e0da7dea23235761fc
This commit is contained in:
commit
8fdf81578e
1 changed files with 7 additions and 0 deletions
|
@ -31,6 +31,9 @@ type TidyProperties struct {
|
|||
|
||||
// Extra checks to enable or disable in clang-tidy
|
||||
Tidy_checks []string
|
||||
|
||||
// Checks that should be treated as errors.
|
||||
Tidy_checks_as_errors []string
|
||||
}
|
||||
|
||||
type tidyFeature struct {
|
||||
|
@ -116,5 +119,9 @@ func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags {
|
|||
}
|
||||
flags.TidyFlags = append(flags.TidyFlags, tidyChecks)
|
||||
|
||||
if len(tidy.Properties.Tidy_checks_as_errors) > 0 {
|
||||
tidyChecksAsErrors := "-warnings-as-errors=" + strings.Join(esc(tidy.Properties.Tidy_checks_as_errors), ",")
|
||||
flags.TidyFlags = append(flags.TidyFlags, tidyChecksAsErrors)
|
||||
}
|
||||
return flags
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue