summaryrefslogtreecommitdiff
path: root/tools/warn/make_warn_patterns.py
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2019-12-09 19:32:03 -0800
committer Chih-Hung Hsieh <chh@google.com> 2019-12-17 15:12:31 -0800
commit888d143e4c57c81634df7166b8fc86e00f38d7d7 (patch)
treeed01484eb15411116cd53d8cab8f0e9c600f261d /tools/warn/make_warn_patterns.py
parent20d1b7d9664990192a52dbf2dd6a3d7ee4123a9b (diff)
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
Diffstat (limited to 'tools/warn/make_warn_patterns.py')
-rw-r--r--tools/warn/make_warn_patterns.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/tools/warn/make_warn_patterns.py b/tools/warn/make_warn_patterns.py
new file mode 100644
index 0000000000..ac3c508ad9
--- /dev/null
+++ b/tools/warn/make_warn_patterns.py
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2019 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Warning patterns for build make tools."""
+
+from severity import Severity
+
+patterns = [
+ # pylint:disable=line-too-long,g-inconsistent-quotes
+ {'category': 'make', 'severity': Severity.MEDIUM,
+ 'description': 'make: overriding commands/ignoring old commands',
+ 'patterns': [r".*: warning: overriding commands for target .+",
+ r".*: warning: ignoring old commands for target .+"]},
+ {'category': 'make', 'severity': Severity.HIGH,
+ 'description': 'make: LOCAL_CLANG is false',
+ 'patterns': [r".*: warning: LOCAL_CLANG is set to false"]},
+ {'category': 'make', 'severity': Severity.HIGH,
+ 'description': 'SDK App using platform shared library',
+ 'patterns': [r".*: warning: .+ \(.*app:sdk.*\) should not link to .+ \(native:platform\)"]},
+ {'category': 'make', 'severity': Severity.HIGH,
+ 'description': 'System module linking to a vendor module',
+ 'patterns': [r".*: warning: .+ \(.+\) should not link to .+ \(partition:.+\)"]},
+ {'category': 'make', 'severity': Severity.MEDIUM,
+ 'description': 'Invalid SDK/NDK linking',
+ 'patterns': [r".*: warning: .+ \(.+\) should not link to .+ \(.+\)"]},
+ {'category': 'make', 'severity': Severity.MEDIUM,
+ 'description': 'Duplicate header copy',
+ 'patterns': [r".*: warning: Duplicate header copy: .+"]},
+ {'category': 'FindEmulator', 'severity': Severity.HARMLESS,
+ 'description': 'FindEmulator: No such file or directory',
+ 'patterns': [r".*: warning: FindEmulator: .* No such file or directory"]},
+ {'category': 'make', 'severity': Severity.HARMLESS,
+ 'description': 'make: unknown installed file',
+ 'patterns': [r".*: warning: .*_tests: Unknown installed file for module"]},
+ {'category': 'make', 'severity': Severity.HARMLESS,
+ 'description': 'unusual tags debug eng',
+ 'patterns': [r".*: warning: .*: unusual tags debug eng"]},
+ {'category': 'make', 'severity': Severity.MEDIUM,
+ 'description': 'make: please convert to soong',
+ 'patterns': [r".*: warning: .* has been deprecated. Please convert to Soong."]},
+]