diff options
| author | 2020-01-06 12:02:27 -0800 | |
|---|---|---|
| committer | 2020-01-06 12:11:44 -0800 | |
| commit | a9f7746f29c528cffd4809976ba711a96dd747d8 (patch) | |
| tree | 08fd72cbc3ff5711f310bc857c161522406fb485 /tools/warn/other_warn_patterns.py | |
| parent | 99202ec0a65060514666916590c4294190a9d0db (diff) | |
Add new compiler warning patterns
* Mostly new Java and Kotlin warnings found in nightly builds.
* More clean up of Java and C++ warning patterns will follow.
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Change-Id: I8776401d15c3a59535722d52a5eec03f954d3b15
Diffstat (limited to 'tools/warn/other_warn_patterns.py')
| -rw-r--r-- | tools/warn/other_warn_patterns.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tools/warn/other_warn_patterns.py b/tools/warn/other_warn_patterns.py index 45d14dc5e7..524673e4f1 100644 --- a/tools/warn/other_warn_patterns.py +++ b/tools/warn/other_warn_patterns.py @@ -39,6 +39,10 @@ def asm(description, pattern_list): return warn('asm', Severity.MEDIUM, description, pattern_list) +def kotlin(description, pattern_list): + return warn('Kotlin', Severity.MEDIUM, description, pattern_list) + + patterns = [ # pylint:disable=line-too-long,g-inconsistent-quotes # aapt warnings @@ -96,16 +100,16 @@ patterns = [ '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 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"]}, - {'category': 'Kotlin', 'severity': Severity.MEDIUM, - 'description': 'Kotlin: library has Kotlin runtime', - 'patterns': [r".*: warning: library has Kotlin runtime bundled into it", - r".*: warning: some JAR files .* have the Kotlin Runtime library"]}, + kotlin('never used parameter or variable', + [r".*\.kt:.*: warning: (parameter|variable) '.*' is never used$", + r".*\.kt:.*: warning: (parameter|variable) '.*' is never used, could be renamed to _$"]), + kotlin('unchecked cast', + [r".*\.kt:.*: warning: unchecked cast: .* to .*$"]), + kotlin('Deprecated in Java', + [r".*\.kt:.*: warning: '.*' is deprecated. Deprecated in Java"]), + kotlin('library has Kotlin runtime', + [r".*: warning: library has Kotlin runtime bundled into it", + r".*: warning: some JAR files .* have the Kotlin Runtime library"]), # Rust warnings {'category': 'Rust', 'severity': Severity.HIGH, 'description': 'Rust: Does not derive Copy', |