History log of /build/tools/warn.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8a7b25c7369aeaffc35cb678ebdb7abab18712e2 16-Nov-2016 Nick Glorioso <glorioso@google.com> Update warn.py for new Error Prone diagnostics

Test: Local build, tee'd to file, ran warn.py and checked output HTML
Change-Id: Iee3386e88c73e4b8e0a1fcc60105ee5fb86e3cb0
/build/make/tools/warn.py
76d0065ef877532a5427907262dccd732d45c8f8 10-Nov-2016 Chih-Hung Hsieh <chh@google.com> Separate parallel_classify_warnings out of parse_input_file.

* Allow other callers of this module to:
* pass any input stream to parse_input_file,
* pass any warning_lines to parallel_classify_warnings,
* call dump_csv or dump_html to get output.
* No output change.
* Capture and ignore signal.SIGTERM at the end,
to avoid bad warning/error messages from the exit clean-up process.

Test: run warn.py build.log.
Change-Id: I1414797a536c0ee622e2a34c226578621be1ddab
/build/make/tools/warn.py
63de300094b90fb9c9a629a13e936c36cabc9781 28-Oct-2016 Chih-Hung Hsieh <chh@google.com> Do not use multiprocessing.Pool when --processes=1.

Purpose of this change is not to save some execution time,
but to avoid forking another process. In other applications
that use a wrapper to call this python script, it is difficult
to get overwritten file I/O functions work in a subprocess.
So the wrapper will call warn.py with --processes=1.

Test: run "warn.py --processes=1 build.log"
Change-Id: I5998d5c70d81a456c86eb4002f444a4a60135477
/build/make/tools/warn.py
92396e17473b13e5f1526d5e1799799e224c20e3 18-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Use parallel subprocesses to classify warnings."
a6bd044ac15370c66d984111d19fe3b31113d42e 12-Oct-2016 Chih-Hung Hsieh <chh@google.com> Use parallel subprocesses to classify warnings.

* Add a --processes flag to specify number of parallel processes,
with default multiprocessing.cpu_count().
* Wrap long line to suppress pylint warning.

Test: run warn.py with a large build.log file.
Change-Id: I9a93a9324bc531c1bce741367013051ce40a67fa
/build/make/tools/warn.py
d0aec89d43004718bc6e808a00c98303298eecfc 18-Oct-2016 Stephen Hines <srhines@google.com> Split apart frameworks/compile into sub-projects.

These projects are all used by RenderScript, but it would be good to
differentiate warnings for each.

Change-Id: I983279d590630175a36075b01e8eec9100c07d26
Test: Ran warn.py
/build/make/tools/warn.py
144864eed0c5113800aa435fc4619edffd077cca 14-Oct-2016 Chih-Hung Hsieh <chh@google.com> Add more patterns for a finer project warning list.

Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: I3cad8e24bc97a84f067a162ff728e30fde3c7197
/build/make/tools/warn.py
6949e7ecba4d99565d638e2d92e1014abb1efe45 12-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Better pattern matching and dump of warning messages."
5722f9247b6760978f759d0fd14ac30ce296abaf 12-Oct-2016 Chih-Hung Hsieh <chh@google.com> Better pattern matching and dump of warning messages.

* Warning messages must start with source file path.
This will reject lines containing only 'warning:'
but not a source file path prefix.
* Escape both backslash and quotation marks in the
dump of strings to JavaScript string literals.

Bug: 32060052
Test: run through build.log files
Change-Id: Ib064768b1ba2954f974604ea054f7a6d2ad15ae7
/build/make/tools/warn.py
a45c5c1cf91849de9befd7ddc89da8cebc33f650 12-Oct-2016 Chih-Hung Hsieh <chh@google.com> Normalize warning source file path to relative path.

Remove Android root directory path from long
absolute source file path.

Test: run warn.py with build.log
Bug: 32059187
Change-Id: Ib630cebd8c56a9fef443139ca502d97e59c7b42e
/build/make/tools/warn.py
1eabb0ecb230cce9f2494bc8110ecc5935a595b2 05-Oct-2016 Chih-Hung Hsieh <chh@google.com> Add a new ANALYZER severity group.

* Separate clang-tidy's clang-analyzer-* warnings from
other clang-tidy warnings.

Bug: 31559947
Test: build with WITH_TIDY=1 and DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,-google-readability-*
Change-Id: If03c421c9319741ef6588bc0d803b6da0cc4433a
/build/make/tools/warn.py
312c310f7c31d849aa05ce4d41229c4665a15d6a 29-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Only run warn.py's main function if it is the main program."
ac9d5df349621c423b9fd9e70397bb23e1d2680b 28-Sep-2016 Meike Baumgärtner <meikeb@google.com> Only run warn.py's main function if it is the main program.

Test: run warn.py --byproject build.log
Change-Id: I155cce8c952d6d8a02c8e1809bf61a46c847c26e
/build/make/tools/warn.py
9f766239f0d47e952e92a4fb229dc94775f6dc9c 28-Sep-2016 Chih-Hung Hsieh <chh@google.com> Fix pylint warning and refactor project_list.

Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: Id442cf6608bf5c14784063c05f5ff0b731f17486
/build/make/tools/warn.py
b426c54e8a89e3b2388a593027f29708f3a2723e 28-Sep-2016 Chih-Hung Hsieh <chh@google.com> Fix Google pylint warnings.

* Rename 'severity' to 'Severity'.
* Fix bad line indentations and space.

Test: run warn.py --byproject build.log
Change-Id: I33d701cca408b5ca4715be8d44c890942b7d132a
/build/make/tools/warn.py
2a38c37d575b3b330d61c12912aeda1faa5159aa 23-Sep-2016 Chih-Hung Hsieh <chh@google.com> Add buttons to group warning by project or severity.

* Add more project patterns.
* Add more top level comments for global variables and functions.
* Resequence severity numbers to match the dump order.
* Emit warning messages and tables to static HTML JavaScript arrays.
* Replace old static HTML table dumper functions with
new dynamic HTML JavaScript to generate sections of warnings.
* Warning messages are grouped into sections by severity or projects.
* Better descriptions for SKIP warning patterns.
* Replace output function with print.

Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: I7b44ef6223d5b2f1aa31655a5a47d854f9a1dedc
/build/make/tools/warn.py
bcd229277a94b59a96f0308a19938e7be1545131 26-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix Google pylint warnings."
6c0fdbb84d04600b8db6e108031a3b02e3f6bb20 26-Sep-2016 Chih-Hung Hsieh <chh@google.com> Fix Google pylint warnings.

* Rename variables and functions to follow Google coding style.
* Fix line indentations to follow Google coding style.
* Add module and function docstrings.
* Change shebang line to avoid pylint warning.
* Suppress some pylint warnings to avoid too many changes at once.
* Fix typos.

Test: run warn.py --byproject build.log
Change-Id: I569961981b562e35cb5609a96cd5ebb40a80829c
/build/make/tools/warn.py
0a19207f7b177e4665a133eb9a5df9318da0d378 21-Sep-2016 Chih-Hung Hsieh <chh@google.com> Recognize new warning messages.

* -Wunnamed-type-template-args and -W#pragma-messages

Test: run warn.py with build.log.
Change-Id: I36277e001081604f92a4d9c92f9a0b5d3f0ee5e5
/build/make/tools/warn.py
99459fc0d0a29ab96c5a3362d0ea9a30c0535b25 22-Sep-2016 Chih-Hung Hsieh <chh@google.com> 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
/build/make/tools/warn.py
121e284b460afc3603b88883563ad3156aa2de4d 15-Sep-2016 Dan Willemsen <dwillemsen@google.com> Fix link_type checking

This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.

Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.

Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.

Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
/build/make/tools/warn.py
e41c99b721145247fcee8f06a0d3bf91f398708e 13-Sep-2016 Chih-Hung Hsieh <chh@google.com> Emit a table of warnings by project and severity.

* Use 't1' CSS class for main warning tables,
and default table style for new warning count table.
* Count total skipped warnings.
* Append count of warnings in each severity header.
* Fix some skipped warning patterns and count/dump skipped warnings.
* Add dumpskippedanchors function to fix expand_collapse
error when --byproject flag is used and severity.SKIP
is not emitted.
* Minor coding style changes:
* Loop through severity.kinds.
* Remove unused import.
* Add spaces around assignment operators.
* Adjust indentation.

Bug: 31377083
Test: run warn.py with build.log
Change-Id: I68949edc4601b10ea2f7ac84e48e6c3da4ab1e4f
/build/make/tools/warn.py
0862c487706bcb3dfc32fd0739ea2d19314a1838 07-Sep-2016 Chih-Hung Hsieh <chh@google.com> Recognize new clang-tidy and Java warnings.

Test: run warn.py with build.log
Change-Id: I11ff844bcfd7fb13aef8909307bc7eb1f5ee9b2a
/build/make/tools/warn.py
01530a6ff238d6526e6900dd5e69bfb4dcda10dc 24-Aug-2016 Chih-Hung Hsieh <chh@google.com> Recognize new warning messages.

* Generalize regular expression to match new warning messages.
* Remove old unused pattern.

Change-Id: I54f2e5bdb255b290cb3751ba56558f5fe8d7245e
Test: Run warn.py with build.log
/build/make/tools/warn.py
d9cd1fafb5db622cb4277f961dd81975a0c0d330 02-Aug-2016 Chih-Hung Hsieh <chh@google.com> Issue warning on projects with LOCAL_CLANG set to false.

* LOCAL_CLANG_EXCEPTION_PROJECTS is the list of project prefixes.
* New warning message is detected by warn.py as high severity.

Bug: 30575506
Change-Id: I87a38b2ba6bab1d2e5e7a9d5ec9557f0e609727c
Test: build and find new warning in build.log
/build/make/tools/warn.py
620ce44a7aa4337d99c29e77134f9951652756e5 27-Jul-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add option to dump HTML warnings per project."
4354a33874648a3524534e4d1e0093f37ded8bf7 22-Jul-2016 Chih-Hung Hsieh <chh@google.com> Add option to dump HTML warnings per project.

* Use --byproject flag to dump warnings in HTML file by projects.
* Add external/google and vendor/google projects, vs other
external/non-google and vendor/non-google projects.
* Refactor code in dumpcategory to dump warnings by projects
when --byproject is specified.
* Recognize new compiler -Wvarargs warning pattern.
* No change to default HTML output format.

Change-Id: I2406ad392ab18683357ff0ee0cf6c41f87cf399c
Test: run through current build.log files.
/build/make/tools/warn.py
c868293abc9f1e8ba5af9587ca92526f478de2b1 26-Jul-2016 Chih-Hung Hsieh <chh@google.com> Add performance* to default global tidy checks.

* This enables 5 performance related checks:
performance-faster-string-find
performance-for-range-copy
performance-implicit-cast-in-loop
performance-unnecessary-copy-initialization
performance-unnecessary-value-param
* Recognize these new warnings in warn.py.

Bug: http://b/27779618
Change-Id: I7af3fdc262dd44db90d3b62eb37c5eac5a2eaa01
Test: build with WITH_TIDY=1 and run warn.py with build.log
/build/make/tools/warn.py
48a16ba7099e22f680ac45acfe4e78d3180549eb 21-Jul-2016 Chih-Hung Hsieh <chh@google.com> 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.
/build/make/tools/warn.py
c21ddbdcce89d73e3482884f4e0cac0c78af7c3b 20-Jul-2016 Chih-Hung Hsieh <chh@google.com> 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.
/build/make/tools/warn.py
5ecafd126035976ac8f3121bfed182b25338bfe2 19-Jul-2016 Chih-Hung Hsieh <chh@google.com> 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
/build/make/tools/warn.py
8d14543a9bc52cbc124d1c4e5f5bad12ec77aa04 02-Jul-2016 Chih-Hung Hsieh <chh@google.com> Recognize new C/C++ compiler and static analyzer warnings.

Change-Id: I5f47c45498c640702922704aa5305a85e9493fcc
Test: run with Android build.log.
/build/make/tools/warn.py
465b6101837079880da3cba880bb291be12a1a68 23-Jun-2016 Chih-Hung Hsieh <chh@google.com> 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.
/build/make/tools/warn.py
6e52003b54a28eed4acbea2eeb11f63e1ddcb488 13-May-2016 Ian Rogers <irogers@google.com> 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
/build/make/tools/warn.py
f38297325073f2c5f109175bf0270d43d282bda7 10-May-2016 Ian Rogers <irogers@google.com> 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
/build/make/tools/warn.py
32bb9bd03adeda1b319e0156da40ff890f57c646 10-May-2016 Ian Rogers <irogers@google.com> Add error prone patterns to warn.py

Bug: 28681096

(cherry picked from commit df79adacaba2d8aebadea2cc638adbe4fd6074bb)
Change-Id: I06ac0ed4593b03cea0a8163ca85e393ff1358855
/build/make/tools/warn.py
2f4ce82d1379aa1697de4845d30b0c4ab8179c71 10-May-2016 Ian Rogers <irogers@google.com> Sort warnings with most frequent first.

Change-Id: Id608c20d065bec83dcb2993658cc743d5e9dcb46
/build/make/tools/warn.py
d742e90fe96c30174f154105b3f333aadd030055 01-Apr-2016 Chih-Hung Hsieh <chh@google.com> Recognize more Clang-Tidy google warning patterns.

* Many AOSP C/C++ code have google-readability warnings.

Bug: http://b/27779618
Change-Id: Ic7d33b957da5c1062410f48ef18bb68a5aa259e9
/build/make/tools/warn.py
90d4619f02999ff04483e623f5efb6f998a6c912 30-Mar-2016 Chih-Hung Hsieh <chh@google.com> 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
/build/make/tools/warn.py
a9be47e7820a1876f9f7d96d9e1838ba02f41d37 21-Mar-2016 Chih-Hung Hsieh <chh@google.com> 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
/build/make/tools/warn.py
ba0ddcd099c70e99c2b1e297d2d5783fbdb38a5e 21-Mar-2016 Chih-Hung Hsieh <chh@google.com> 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
/build/make/tools/warn.py
f8aaf60ceb81416a6698575556c83ce860c25fc6 16-Mar-2016 Chih-Hung Hsieh <chh@google.com> Classify more warning patterns.

Some warnings are from clang static analyzer
and they do not have compiler -W flag.

BUG: 27698849
Change-Id: I3d1fc9c2d6c60100e87f8ea201d3f8314370fccd
/build/make/tools/warn.py
8e20196b813ed9e4ed01a62906beb229d3043e90 11-Mar-2010 Marco Nelissen <marcone@google.com> Update warn.py with more warnings

Change-Id: Ic65e6effe2be60d6a6c2a53c6acf356ad9e7ea94
/build/make/tools/warn.py
2bdc7ec9cf274727e2d682d82ca7f8bd9ba42779 29-Sep-2009 Marco Nelissen <marcone@google.com> Speed up warn.py about 30x by precompiling all the regular expressions.
/build/make/tools/warn.py
5236fbde30b3dbbf1332f6cee20978ec618f01f3 31-Jul-2009 Marco Nelissen <marcone@google.com> Update warn.py with the latest warnings that popped up in the build.
/build/make/tools/warn.py
594375db5f1eb4576fec7f6fb37e7a322a5d848b 14-Jul-2009 Marco Nelissen <marcone@google.com> Python script to parse a build log and present the warnings in html
/build/make/tools/warn.py