* The index was a directory or file path.
This change adds additional entries that have
warning type prefix in the index.
* In the "Directories/Files with at least 1% warnings"
section, the list will include number of warnings for
(1) "all warnings in a directory/file"
(2) "warnings of a type in a directory/file"
(3) "warnings of a type in all directories/files"
Examples:
4273 (8.7%) frameworks/av/...
4130 (8.4%) packages/...
2427 (5.0%) [google-explicit-constructor] */...
1628 (3.3%) [cert-err34-c] */...
1099 (2.2%) [google-runtime-int] bionic/tests/math_data/...
608 (1.2%) [cert-err34-c] external/...
Bug: 231245501
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I13bb54c846ad514334f78c5a71e994a131a92963
* Now with 4 sections that can be shown/hidden independently.
* After the 'selected_projects' section, add two more sections:
* 'top_directory_section' contains
* a table of directories with at least 1% warnings.
* a 'selected_directory_warnings' subsection to show all warnings
in the clicked directory from the directory table
* 'top_file_section' contains
* a table of files with at least 100 or 1% warnings.
* a 'selected_file_warnings' subsection to show all warnings
in the clicked file from the file table
* Adjust button/section spaces and reduce button font size to 100%.
* Rename drawTable to genTables.
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I765b09a46adc111cfe781719ba7aa0f917aa6ffc
* New "clang-tidy used ... seconds" warnings are reported when
clang-tidy runs for more than 1/2 of TIDY_TIMEOUT seconds.
* Recognize other clang-tidy warnings in separate groups;
they should not be used in normal Android builds.
* Add two more variants of C++ warnings.
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I4a2e1c3c817c586cfe3da125b920cca77fcc63b6
* Recognize USE_RBE special environment variable.
* Remove RBE special file path prefix /b/f/w/
and any leading characters.
* Only do this for android now, maybe for chrome later.
* When finding android_root, do not use
/b/f/w/ and /tmp/ file paths.
* Recognize BUILD_ID and add it into .html output.
* Style improvement with continue statements.
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Bug: 198657613
Change-Id: I57746f026d5d8b71e792127b8d6ba15f6b28103c
* add .pylintrc to use 2 space indentation
* rename single-letter local variables
Test: ./warn.py build.log > warnings.html
Change-Id: I2ca56a6cb130a9d6c73328c5592ad7cde8a974ab
* Add missing function doc strings.
Suppress this warning on trivial functions in *_warn_patterns.py.
* Remove unused g-importing-memeber, g-complex-comprehension.
* Suppress pylint warning on unrecognized g-* options.
* Suppress too-few-public-methods warnings on simple classes.
* Suppress too-many-arguments and missing-function-docstring in
html_writer.py, which will be refactored later.
* Fix bad naming, long lines and line breaks, and bad quotes.
Test: compare output for build.log
Change-Id: Icdb34f014a10ec1e642c2cfe8003fc3ae245b507
As we move towards becoming a Mainline module, it's important that
we catch as many bugs as possible during initial code review, and
Error Prone is designed to do exactly that.
Instead of lumping ourselves into the generic "packages" grouping,
this change adds a specific package for this Mainline module.
Bug: 142561358
Test: ./build/soong/soong_ui.bash --make-mode MediaProviderLegacy com.google.android.mediaprovider MediaProviderTests RUN_ERROR_PRONE=true
Change-Id: I62102febe39225a54c77d9ad463c350b3df9cafa
* add more Java, Kotlin, and Rust warning patterns
* recognize more clang-tidy cert-* and bugprone-* warnings;
still keep the catch-all 'cert' and 'bugprone' groups.
Test: warn.py build.log > warnings.html
Change-Id: I909ec09822f42f60493ebe943c055bf0d4b69938
* add chrome_project_list.py
* use newer Chrome's warn_common.py and severity.py
* modify warn_common.py to work with both python2 and python3,
to work with and without google3
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I9aeee7031c11988d8ead1733ff4846ae6cb1ee73
* HTML emit functions now take a writer parameter.
This makes warn_common.py one step closer to the ChromeOS version.
* Add new found warning patterns from java and yacc.
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I5c446ca767746598f07603591fdf98f7d82cae17
* Remove the useless 'option' key.
It is only used in some C/C++ warning patterns
to give a hint of options to turn to -Werror.
Now the global default is -Werror.
* Factor out common code patterns into high/medium/low functions.
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: Ibd3f768b1552ada925eb5afb0f01ab674c968a87
* This new class definition and patterns are
shared between Android and ChromeOS compiler tools.
* Suppress hard to fix and false positive linter warnings.
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: Icb47809100ad30796cb1da82610e989d450194fa
* 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
* Split warning patterns into *_warn_patterns.py
* Split project list into android_project_list.py
* Split out the Severity class, to be changed later
* Split core of warn.py into warn_common.py and
leave only platform dependent code in warn.py.
This allows the core logic be used with different
parallel processing libraries.
* Old warn.py just calls -m warn.warn.
Test: path_to_build/tools/warn.py build.log
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Change-Id: I6734e4472a21018cd5ce06d549f6dbca24f4de54