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
This commit is contained in:
Chih-Hung Hsieh
2020-01-10 10:33:40 -08:00
parent 5ec7b56e5d
commit 949205a661
9 changed files with 314 additions and 252 deletions

View File

@@ -1,4 +1,4 @@
#
# python3
# Copyright (C) 2019 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,9 +15,12 @@
"""Warning patterns for build make tools."""
from severity import Severity
# pylint:disable=relative-beyond-top-level
from .cpp_warn_patterns import compile_patterns
# pylint:disable=g-importing-member
from .severity import Severity
patterns = [
warn_patterns = [
# pylint:disable=line-too-long,g-inconsistent-quotes
{'category': 'make', 'severity': Severity.MEDIUM,
'description': 'make: overriding commands/ignoring old commands',
@@ -51,3 +54,6 @@ patterns = [
'description': 'make: please convert to soong',
'patterns': [r".*: warning: .* has been deprecated. Please convert to Soong."]},
]
compile_patterns(warn_patterns)