OSDN Git Service

Simplify warn.py and output of warning count table and tablerow.
authorChih-Hung Hsieh <chh@google.com>
Thu, 22 Sep 2016 20:43:12 +0000 (13:43 -0700)
committerChih-Hung Hsieh <chh@google.com>
Thu, 22 Sep 2016 22:15:43 +0000 (15:15 -0700)
commit99459fc0d0a29ab96c5a3362d0ea9a30c0535b25
tree1d2aa8a32a22625b8c1240b3dd8486ffeb5606c7
parent52eafee87acaeab1b955b4979b7f91db6bc1c026
Simplify warn.py and output of warning count table and tablerow.

* Use a loop to initialize empty 'members' and 'option' of warnpatterns.
* Create severity.{color,columnheader,header} from an attributes list.
* Compute totalbyproject and totalbyseverity from a constructor.
* Skip all-zero rows and columns in the warning count table.
* Remove redundant spaces and newlines in tablerow output.

Test: run through build.log files
Change-Id: I4d3fa4ecd92e1afab91d85b7535d03f8696e83d8
tools/warn.py