Add new clang-tidy and clang warning patterns
* New "clang-tidy used ... seconds" warnings are reported when clang-tidy runs for more than 1/2 of TIDY_TIMEOUT seconds. * Recognize other clang-tidy warnings in separate groups; they should not be used in normal Android builds. * Add two more variants of C++ warnings. Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html Test: warn.py --gencsv build.log > warnings.csv Change-Id: I4a2e1c3c817c586cfe3da125b920cca77fcc63b6
This commit is contained in:
parent
b9b28016e6
commit
f36e01de61
|
@ -297,6 +297,7 @@ warn_patterns = [
|
|||
[r".*: warning: declaration 'class .+' does not declare anything"]),
|
||||
medium('Initialization order will be different',
|
||||
[r".*: warning: '.+' will be initialized after",
|
||||
r".*: warning: initializer order does not match the declaration order",
|
||||
r".*: warning: field .+ will be initialized after .+Wreorder"]),
|
||||
skip('skip, ....',
|
||||
[r".*: warning: '.+'"]),
|
||||
|
@ -448,6 +449,7 @@ warn_patterns = [
|
|||
[r".*: warning: 'operator new' must not return NULL unless it is declared 'throw\(\)' .+"]),
|
||||
medium('NULL used in arithmetic',
|
||||
[r".*: warning: NULL used in arithmetic",
|
||||
r".*: warning: .* subtraction with a null pointer",
|
||||
r".*: warning: comparison between NULL and non-pointer"]),
|
||||
medium('Misspelled header guard',
|
||||
[r".*: warning: '.+' is used as a header guard .+ followed by .+ different macro"]),
|
||||
|
|
|
@ -81,6 +81,7 @@ def analyzer_group_check(check):
|
|||
warn_patterns = [
|
||||
# pylint does not recognize g-inconsistent-quotes
|
||||
# pylint:disable=line-too-long,bad-option-value,g-inconsistent-quotes
|
||||
group_tidy_warn_pattern('altera'),
|
||||
group_tidy_warn_pattern('android'),
|
||||
simple_tidy_warn_pattern('abseil-string-find-startswith'),
|
||||
simple_tidy_warn_pattern('bugprone-argument-comment'),
|
||||
|
@ -127,8 +128,9 @@ warn_patterns = [
|
|||
simple_tidy_warn_pattern('cert-oop54-cpp'),
|
||||
group_tidy_warn_pattern('cert'),
|
||||
group_tidy_warn_pattern('clang-diagnostic'),
|
||||
group_tidy_warn_pattern('concurrency'),
|
||||
group_tidy_warn_pattern('cppcoreguidelines'),
|
||||
group_tidy_warn_pattern('llvm'),
|
||||
group_tidy_warn_pattern('fuchsia'),
|
||||
simple_tidy_warn_pattern('google-default-arguments'),
|
||||
simple_tidy_warn_pattern('google-runtime-int'),
|
||||
simple_tidy_warn_pattern('google-runtime-operator'),
|
||||
|
@ -152,8 +154,10 @@ warn_patterns = [
|
|||
simple_tidy_warn_pattern('hicpp-noexcept-move'),
|
||||
simple_tidy_warn_pattern('hicpp-use-override'),
|
||||
group_tidy_warn_pattern('hicpp'),
|
||||
group_tidy_warn_pattern('modernize'),
|
||||
group_tidy_warn_pattern('llvm'),
|
||||
group_tidy_warn_pattern('llvmlibc'),
|
||||
group_tidy_warn_pattern('misc'),
|
||||
group_tidy_warn_pattern('modernize'),
|
||||
simple_tidy_warn_pattern('performance-faster-string-find'),
|
||||
simple_tidy_warn_pattern('performance-for-range-copy'),
|
||||
simple_tidy_warn_pattern('performance-implicit-cast-in-loop'),
|
||||
|
@ -173,6 +177,7 @@ warn_patterns = [
|
|||
group_tidy_warn_pattern('portability'),
|
||||
|
||||
tidy_warn('TIMEOUT', [r".*: warning: clang-tidy aborted "]),
|
||||
tidy_warn('Long Runs', [r".*: warning: clang-tidy used "]),
|
||||
|
||||
# warnings from clang-tidy's clang-analyzer checks
|
||||
analyzer_high('clang-analyzer-core, null pointer',
|
||||
|
|
Loading…
Reference in New Issue