Commit Graph

18 Commits

Author SHA1 Message Date
Chih-Hung Hsieh 48a16ba709 Count warnings per project and dump out CSV format.
* No change to html output, except removing unused "PageTop" anchor.
* Add --gencsv flag to output a CSV file instead of html file.
  CSV files are combined to a table for dashboard charts.
* Count warnings from selected source project directories.
* CSV output lines are:
   num_of_warnings,project_name,warning_description
* project_name is empty for sum of warnings from all projects.
* warning_description could be:
  (1) "<severity>: <warning type description>"
      for one warning type, or
  (2) "<severity> warnings"
      for all warning types of the severity.

Change-Id: I1cf976ed0cf142091226b22665b7f28d383608fd
Test: run through current build.log files.
2016-07-21 14:43:02 -07:00
Chih-Hung Hsieh c21ddbdcce Recognize new clang and clang-tidy warnings.
* Count new clang-tidy warnings:
    google-runtime-references
    google-runtime-operator
* Count new clang warnings:
    -Wconst-conversion similar to -Wliteral-conversion
    -Wundefined-var-template
* Modified static analyzer warning message about
    "Null passed to a callee that requires a non-null ..."
* Disable google-runtime-references by default and
  disable misc-macro-parentheses in vendor projects;
  too many old C/C++ code have this warning.

Change-Id: Ib35e0af85875aada17c92b0237b76cd5ae3bfcc8
Test: build with clang-tidy.
2016-07-20 14:45:01 -07:00
Chih-Hung Hsieh 5ecafd1260 Avoid matching the same warning line twice.
Used to skip only immediately followed identical warning lines.
Now classifywarning is called only once for each unique warning line.

Change-Id: Ie3b77ded70b41dafad91c042dbe15ad2be119e62
Test: run through build.log file
2016-07-18 15:27:02 -07:00
Chih-Hung Hsieh 8d14543a9b Recognize new C/C++ compiler and static analyzer warnings.
Change-Id: I5f47c45498c640702922704aa5305a85e9493fcc
Test: run with Android build.log.
2016-07-06 10:22:23 -07:00
Chih-Hung Hsieh 465b610183 Add +/- buttons to expand/collapse warning categories.
* Add expand/collapse-all buttons to expand/collapse all warnings.
* Use HTML styles to reduce output file size.

Change-Id: Ica188cc4f123ce0ab8547f88315325c3e0560a39
Test: Checked output html file with Chrome browser.
2016-06-23 13:18:58 -07:00
Ian Rogers 6e52003b54 Make Error Prone warnings in sync with Error Prone documenation.
Use summary information from annotation within Error Prone to auto-generate
the warnings list.

Bug: 28681096
Change-Id: Ib3a5f734bd229726fcd7332eaa9e0e1bd1200c25
2016-05-13 10:18:18 -07:00
Ian Rogers f382973250 Add code search links to warnings.
Add argument parsing using the argparse library.
Make HTML easier to read by adding a \n after each table row.

Change-Id: I6b745fc60afb96fb51e5f69df7d607b5fb8da0e5
2016-05-10 22:36:38 -07:00
Ian Rogers 32bb9bd03a Add error prone patterns to warn.py
Bug: 28681096

(cherry picked from commit df79adacab)
Change-Id: I06ac0ed4593b03cea0a8163ca85e393ff1358855
2016-05-10 13:54:36 -07:00
Ian Rogers 2f4ce82d13 Sort warnings with most frequent first.
Change-Id: Id608c20d065bec83dcb2993658cc743d5e9dcb46
2016-05-10 09:34:29 -07:00
Chih-Hung Hsieh d742e90fe9 Recognize more Clang-Tidy google warning patterns.
* Many AOSP C/C++ code have google-readability warnings.

Bug: http://b/27779618
Change-Id: Ic7d33b957da5c1062410f48ef18bb68a5aa259e9
2016-03-31 16:14:55 -07:00
Chih-Hung Hsieh 90d4619f02 Recognize Clang-Tidy warning messages.
* Put all Clang-Tidy warning messages in a group for now.
  There are too many coding style warnings.
* Change the 'top' link to the top of the page.
* Add a few more new clang compiler warnings.

Bug: http://b/27779618
Change-Id: I385b9db927a397704b56f53440301352da8694cf
2016-03-29 15:33:11 -07:00
Chih-Hung Hsieh a9be47e782 Dump table of warning counts before all warnings.
* The table of warning counts has links to each warning pattern section,
  which has a new anchor.
* Each warning pattern section has a new link to the 'top' of the table
  of warning counts.
* Background color of unknown warnings is changed to more visible light blue.

BUG: 27698849
Change-Id: Ia3d4a8511bd42f44f6a47afcb9c3889f6d62b9f2
2016-03-22 10:44:11 -07:00
Chih-Hung Hsieh ba0ddcd099 Add more patterns, dump sorted unique warnings.
* Sort and remove duplicated warning messages.
* Recognize more warning message patterns from new clang compiler.

BUG: http://b/27698849

Change-Id: Iebbe8600353269d8c2d49ef9d97a72be1d978a24
2016-03-22 16:31:18 +00:00
Chih-Hung Hsieh f8aaf60ceb Classify more warning patterns.
Some warnings are from clang static analyzer
and they do not have compiler -W flag.

BUG: 27698849
Change-Id: I3d1fc9c2d6c60100e87f8ea201d3f8314370fccd
2016-03-16 15:15:40 -07:00
Marco Nelissen 8e20196b81 Update warn.py with more warnings
Change-Id: Ic65e6effe2be60d6a6c2a53c6acf356ad9e7ea94
2010-03-10 16:16:02 -08:00
Marco Nelissen 2bdc7ec9cf Speed up warn.py about 30x by precompiling all the regular expressions. 2009-09-29 10:19:29 -07:00
Marco Nelissen 5236fbde30 Update warn.py with the latest warnings that popped up in the build. 2009-07-31 09:02:11 -07:00
Marco Nelissen 594375db5f Python script to parse a build log and present the warnings in html 2009-07-14 12:22:29 -07:00