blob: 838ff38cacc8c0f5427806acb65cb50903d2dad3 [file] [log] [blame]
Douglas Anderson518003b2017-12-21 10:12:40 -08001# Copyright 2017 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5[MESSAGES CONTROL]
6
7# Disable the message, report, category or checker with the given id(s). You
8# can either give multiple identifier separated by comma (,) or put this option
9# multiple times (only on the command line, not in the configuration file where
10# it should appear only once).
11# C0103: Invalid name ""
12# C0111: Missing docstring
13# C0301: Line too long.
14# C0302: Too many lines in module (N)
15# C0321: More than one statement on a single line
16# E1103: Instance has no '*' member (but some types could not be inferred)
17# I0011: Locally disabling warning.
18# I0012: Locally enabling warning.
19# R0201: Method could be a function
20# R0902: Too many instance attributes (N/7)
21# R0903: Too few public methods (N/2)
22# R0911: Too many return statements (N/6)
23# R0912: Too many branches (N/12)
24# R0913: Too many arguments (N/5)
25# R0914: Too many local variables (N/15)
26# R0915: Too many statements (N/50)
27# W0122: Use of the exec statement
28# W0102: Dangerous default value
29# W0141: Used builtin function ''
30# W0142: Used * or ** magic
31# W0212: Access to protected member
32# W0311: Bad indentation.
33# W0312: Found indentation with tabs instead of spaces
34# W0403: Relative import 'constants', should be 'chromite.cbuildbot.constants'
35# W0511: Used when a warning note as FIXME or XXX is detected.
36# W0622: Redefining built-in
37# R0904: Too many public methods
38# R0921: Abstract class not referenced.
39disable=C0103,C0111,C0301,C0302,C0321,E1103,I0011,I0012,R0201,R0902,R0903,R0911,R0912,R0913,R0914,R0915,W0102,W0122,W0141,W0142,W0212,W0311,W0312,W0403,W0511,W0622,R0904,R0921
40
41
42[REPORTS]
43
44# Tells whether to display a full report or only the messages
45# CHANGE: No report.
46reports=no
47
48
49[TYPECHECK]
50
51# List of members which are set dynamically and missed by pylint inference
52# system, and so shouldn't trigger E0201 when accessed.
53# CHANGE: Added 'AndReturn', 'InAnyOrder' and 'MultipleTimes' for pymox.
54# CHANGE: Added tempdir for @osutils.TempDirDecorator.
55generated-members=REQUEST,acl_users,aq_parent,AndReturn,InAnyOrder,MultipleTimes,tempdir
56
57
58[BASIC]
59
60# Regular expression which should only match correct function names
61#
62# CHANGE: The ChromiumOS standard is different than PEP-8, so we need to
63# redefine this.
64#
65# Common exceptions to ChromiumOS standard:
66# - main: Standard for main function
67function-rgx=([A-Z_][a-zA-Z0-9]{2,30}|main)$
68
69# Regular expression which should only match correct method names
70#
71# CHANGE: The ChromiumOS standard is different than PEP-8, so we need to
72# redefine this. Here's what we allow:
73# - CamelCaps, starting with a capital letter. No underscores in function
74# names. Can also have a "_" prefix (private method) or a "test" prefix
75# (unit test).
76# - Methods that look like __xyz__, which are used to do things like
77# __init__, __del__, etc.
78# - setUp, tearDown: For unit tests.
79method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,30}|__[a-z]+__|setUp|tearDown)$
80
81
82[SIMILARITIES]
83
84# Minimum lines number of a similarity.
85min-similarity-lines=8
86