blob: a54c502f3aad142724decc1d20b91e2b59b97509 [file] [log] [blame]
Chih-Hung Hsieh949205a2020-01-10 10:33:40 -08001# python3
Chih-Hung Hsieh888d1432019-12-09 19:32:03 -08002# Copyright (C) 2019 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16"""Warning patterns for build make tools."""
17
Chih-Hung Hsieh949205a2020-01-10 10:33:40 -080018# pylint:disable=relative-beyond-top-level
Chih-Hung Hsieh3cce2bc2020-02-27 15:39:18 -080019from .cpp_warn_patterns import compile_patterns
Chih-Hung Hsieh949205a2020-01-10 10:33:40 -080020from .severity import Severity
Chih-Hung Hsieh888d1432019-12-09 19:32:03 -080021
Chih-Hung Hsieh949205a2020-01-10 10:33:40 -080022warn_patterns = [
Chih-Hung Hsieh98b285d2021-04-28 14:49:32 -070023 # pylint does not recognize g-inconsistent-quotes
24 # pylint:disable=line-too-long,bad-option-value,g-inconsistent-quotes
Chih-Hung Hsieh888d1432019-12-09 19:32:03 -080025 {'category': 'make', 'severity': Severity.MEDIUM,
26 'description': 'make: overriding commands/ignoring old commands',
27 'patterns': [r".*: warning: overriding commands for target .+",
28 r".*: warning: ignoring old commands for target .+"]},
29 {'category': 'make', 'severity': Severity.HIGH,
30 'description': 'make: LOCAL_CLANG is false',
31 'patterns': [r".*: warning: LOCAL_CLANG is set to false"]},
32 {'category': 'make', 'severity': Severity.HIGH,
33 'description': 'SDK App using platform shared library',
34 'patterns': [r".*: warning: .+ \(.*app:sdk.*\) should not link to .+ \(native:platform\)"]},
35 {'category': 'make', 'severity': Severity.HIGH,
36 'description': 'System module linking to a vendor module',
37 'patterns': [r".*: warning: .+ \(.+\) should not link to .+ \(partition:.+\)"]},
38 {'category': 'make', 'severity': Severity.MEDIUM,
39 'description': 'Invalid SDK/NDK linking',
40 'patterns': [r".*: warning: .+ \(.+\) should not link to .+ \(.+\)"]},
41 {'category': 'make', 'severity': Severity.MEDIUM,
42 'description': 'Duplicate header copy',
43 'patterns': [r".*: warning: Duplicate header copy: .+"]},
44 {'category': 'FindEmulator', 'severity': Severity.HARMLESS,
45 'description': 'FindEmulator: No such file or directory',
46 'patterns': [r".*: warning: FindEmulator: .* No such file or directory"]},
47 {'category': 'make', 'severity': Severity.HARMLESS,
48 'description': 'make: unknown installed file',
49 'patterns': [r".*: warning: .*_tests: Unknown installed file for module"]},
50 {'category': 'make', 'severity': Severity.HARMLESS,
51 'description': 'unusual tags debug eng',
52 'patterns': [r".*: warning: .*: unusual tags debug eng"]},
53 {'category': 'make', 'severity': Severity.MEDIUM,
54 'description': 'make: please convert to soong',
55 'patterns': [r".*: warning: .* has been deprecated. Please convert to Soong."]},
Chih-Hung Hsieha7f5f3f2020-01-31 16:14:04 -080056 {'category': 'make', 'severity': Severity.MEDIUM,
57 'description': 'make: deprecated macros',
58 'patterns': [r".*\.mk:.* warning:.* [A-Z_]+ (is|has been) deprecated."]},
Chih-Hung Hsieh888d1432019-12-09 19:32:03 -080059]
Chih-Hung Hsieh949205a2020-01-10 10:33:40 -080060
61
62compile_patterns(warn_patterns)