blob: bb23f2c032e99c63d11b54388cdcbba7d1db3039 [file] [log] [blame]
Chih-Hung Hsieh888d1432019-12-09 19:32:03 -08001#
2# 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"""Severity levels and attributes."""
17
18
19class Severity(object):
20 """Severity levels and attributes."""
21 # numbered by dump order
22 FIXMENOW = 0
23 HIGH = 1
24 MEDIUM = 2
25 LOW = 3
26 ANALYZER = 4
27 TIDY = 5
28 HARMLESS = 6
29 UNKNOWN = 7
30 SKIP = 8
31 range = range(SKIP + 1)
32 attributes = [
33 # pylint:disable=bad-whitespace
34 ['fuchsia', 'FixNow', 'Critical warnings, fix me now'],
35 ['red', 'High', 'High severity warnings'],
36 ['orange', 'Medium', 'Medium severity warnings'],
37 ['yellow', 'Low', 'Low severity warnings'],
38 ['hotpink', 'Analyzer', 'Clang-Analyzer warnings'],
39 ['peachpuff', 'Tidy', 'Clang-Tidy warnings'],
40 ['limegreen', 'Harmless', 'Harmless warnings'],
41 ['lightblue', 'Unknown', 'Unknown warnings'],
42 ['grey', 'Unhandled', 'Unhandled warnings']
43 ]
44 colors = [a[0] for a in attributes]
45 column_headers = [a[1] for a in attributes]
46 headers = [a[2] for a in attributes]
47