Commit graph

8 commits

Author SHA1 Message Date
Chih-Hung Hsieh
02f0df83fc Lower severity of 3 tidy warnings
* bcmp/bcopy/bzero are not insecureAPI on Android.
* Android projects may enable/disable clang-tidy checks locally;
  warn/*patterns.py keep global classification of all warnings.

Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I7720f7babd0a33c1b6602c9a8bb67565c45db94e
2022-01-20 16:13:12 -08:00
Chih-Hung Hsieh
f36e01de61 Add new clang-tidy and clang warning patterns
* 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
2021-10-08 13:18:24 -07:00
Chih-Hung Hsieh
3bb6c9448b Add new clang and clang-tidy warning patterns
* New "clang-tidy aborted ..." warnings are reported when
  clang-tidy runs for more than TIDY_TIMEOUT seconds.

Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: Iea62b06b2cf78737d7713dabbcf6d9ac8ba23898
2021-09-23 13:51:08 -07:00
Chih-Hung Hsieh
98b285dafb Fix/suppress most pylint and gpylint warnings
* 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
2021-04-28 14:57:56 -07:00
Chih-Hung Hsieh
3cce2bcc60 Separate html/csv output functions into html_writer.py
* also suppress some pylint warnings

Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I497dbb7496ca21470ba33db03eedb27f5e8f1e96
2020-02-27 15:39:18 -08:00
Chih-Hung Hsieh
445ad810c8 Recognize more warning patterns.
* 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
2020-02-26 14:34:21 -08:00
Chih-Hung Hsieh
949205a661 Use new Severity class and update *_warn_patterns
* 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
2020-01-10 15:21:20 -08:00
Chih-Hung Hsieh
888d143e4c Split warn.py into multiple files
* 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
2019-12-17 15:12:31 -08:00