Add new Asm/C++/Java/Make warning patterns

* Change some incorrectly-classified logtags warnings to C++.
* Fix gpylint warnings of long lines in html_writer.py.

Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I98c01dadfd72b202d81ef7c94e93c42182f6065c
This commit is contained in:
Chih-Hung Hsieh
2021-06-01 16:03:22 -07:00
committed by Chih-hung Hsieh
parent 54b437286b
commit 5d9ee04f56
5 changed files with 54 additions and 29 deletions

View File

@@ -74,6 +74,8 @@ warn_patterns = [
[r'.*\.class\): warning: Cannot find annotation method .+ in']),
java_medium('No class/method in SDK ...',
[r'.*\.java:.*: warning: No such (class|method) .* for SDK']),
java_medium('Unknown enum constant',
[r'unknown_source_file: warning: unknown enum constant .+']),
# Warnings generated by Error Prone
java_medium('Non-ascii characters used, but ascii encoding specified',
[r".*: warning: unmappable character for encoding ascii"]),
@@ -207,6 +209,8 @@ warn_patterns = [
'Logging or rethrowing exceptions should usually be preferred to catching and calling printStackTrace'),
medium('CatchFail',
'Ignoring exceptions and calling fail() is unnecessary, and makes test output less useful'),
medium('ChangedAbstract',
'Method has changed \'abstract\' qualifier'),
medium('ClassCanBeStatic',
'Inner class is non-static but does not reference enclosing class'),
medium('ClassNewInstance',
@@ -355,6 +359,8 @@ warn_patterns = [
'equals method doesn\'t override Object.equals'),
medium('NotCloseable',
'Not closeable'),
medium('NullableCollection',
'Method should not return a nullable collection'),
medium('NullableConstructor',
'Constructors should not be annotated with @Nullable since they cannot return null'),
medium('NullableDereference',