summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2019-09-26 12:09:55 -0700
committer Chih-Hung Hsieh <chh@google.com> 2019-09-26 12:14:32 -0700
commit83980501d9a3bb536d59980d0f2021f2d1047fed (patch)
tree47ae20f2bcccdc9c18c6509f6fa6834b7a71fc38
parentc600707e99b61c7ac2c6c1da116c5b319c241f41 (diff)
Fix severity of analyzer warnings; add new warnings.
* The following were high severity warnings but mistakenly grouped into analyzer warnings in a recent change. clang-analyzer-unix.Malloc clang-analyzer-cplusplus.NewDeleteLeaks clang-analyzer-cplusplus.NewDelete * Add new Protoc and Kotlin warnings about unused imports and variables. Bug: 141493530 Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html Change-Id: Ied1f9ace97f29fba58a40dff2346a0391ab22f06
-rwxr-xr-xtools/warn.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/warn.py b/tools/warn.py
index f91c811a66..5994124ba0 100755
--- a/tools/warn.py
+++ b/tools/warn.py
@@ -1749,7 +1749,9 @@ warn_patterns = [
analyzer_warn_check('clang-analyzer-security.insecureAPI.strcpy'),
analyzer_group_high('clang-analyzer-security.insecureAPI'),
analyzer_group_high('clang-analyzer-security'),
- analyzer_group_check('clang-analyzer-unix.Malloc'),
+ analyzer_high_check('clang-analyzer-unix.Malloc'),
+ analyzer_high_check('clang-analyzer-cplusplus.NewDeleteLeaks'),
+ analyzer_high_check('clang-analyzer-cplusplus.NewDelete'),
analyzer_group_check('clang-analyzer-unix'),
analyzer_group_check('clang-analyzer'), # catch al
@@ -1767,11 +1769,14 @@ warn_patterns = [
{'category': 'Protoc', 'severity': Severity.MEDIUM,
'description': 'Proto: Enum name colision after strip',
'patterns': [r".*: warning: Enum .* has the same name .* ignore case and strip"]},
+ {'category': 'Protoc', 'severity': Severity.MEDIUM,
+ 'description': 'Proto: Import not used',
+ 'patterns': [r".*: warning: Import .*/.*\.proto but not used.$"]},
# Kotlin warnings
{'category': 'Kotlin', 'severity': Severity.MEDIUM,
- 'description': 'Kotlin: never used parameter',
- 'patterns': [r".*: warning: parameter '.*' is never used"]},
+ 'description': 'Kotlin: never used parameter or variable',
+ 'patterns': [r".*: warning: (parameter|variable) '.*' is never used$"]},
{'category': 'Kotlin', 'severity': Severity.MEDIUM,
'description': 'Kotlin: Deprecated in Java',
'patterns': [r".*: warning: '.*' is deprecated. Deprecated in Java"]},