Add new clang and clang-tidy warning patterns
* New "clang-tidy aborted ..." warnings are reported when clang-tidy runs for more than TIDY_TIMEOUT seconds. Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html Test: warn.py --gencsv build.log > warnings.csv Change-Id: Iea62b06b2cf78737d7713dabbcf6d9ac8ba23898
This commit is contained in:
@@ -23,15 +23,19 @@ from .cpp_warn_patterns import compile_patterns
|
||||
from .severity import Severity
|
||||
|
||||
|
||||
def tidy_warn_pattern(description, pattern):
|
||||
def tidy_warn(description, patterns):
|
||||
return {
|
||||
'category': 'C/C++',
|
||||
'severity': Severity.TIDY,
|
||||
'description': 'clang-tidy ' + description,
|
||||
'patterns': [r'.*: .+\[' + pattern + r'\]$']
|
||||
'patterns': patterns,
|
||||
}
|
||||
|
||||
|
||||
def tidy_warn_pattern(description, pattern):
|
||||
return tidy_warn(description, [r'.*: .+\[' + pattern + r'\]$'])
|
||||
|
||||
|
||||
def simple_tidy_warn_pattern(description):
|
||||
return tidy_warn_pattern(description, description)
|
||||
|
||||
@@ -168,6 +172,8 @@ warn_patterns = [
|
||||
simple_tidy_warn_pattern('portability-simd-intrinsics'),
|
||||
group_tidy_warn_pattern('portability'),
|
||||
|
||||
tidy_warn('TIMEOUT', [r".*: warning: clang-tidy aborted "]),
|
||||
|
||||
# warnings from clang-tidy's clang-analyzer checks
|
||||
analyzer_high('clang-analyzer-core, null pointer',
|
||||
[r".*: warning: .+ pointer is null .*\[clang-analyzer-core"]),
|
||||
|
Reference in New Issue
Block a user