forked from secure-systems-lab/securesystemslib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pylintrc
54 lines (47 loc) · 2.1 KB
/
pylintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Pylint section
# Minimal pylint configuration file for Secure Systems Lab Python Style Guide:
# https://github.com/secure-systems-lab/code-style-guidelines
#
# Based on Google Python Style Guide pylintrc and pylint defaults:
# https://google.github.io/styleguide/pylintrc
# http://pylint.pycqa.org/en/latest/technical_reference/features.html
[MASTER]
ignore = _vendor
[message_control]
# Disable the message, report, category or checker with the given id(s).
# NOTE: To keep this config as short as possible we only disable checks that
# are currently in conflict with our code. If new code displeases the linter
# (for good reasons) consider updating this config file, or disable checks with.
disable =
fixme,
too-few-public-methods,
too-many-arguments,
format,
duplicate-code
[basic]
good-names = i,j,k,v,e,f,fn,fp,_type,_
# Regexes for allowed names are copied from the Google pylintrc
# NOTE: Pylint captures regex name groups such as 'snake_case' or 'camel_case'.
# If there are multiple groups it enfoces the prevalent naming style inside
# each modules. Names in the exempt capturing group are ignored.
function-rgx = ^(?:(?P<exempt>setUp|tearDown|setUpModule|tearDownModule)|(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$
method-rgx = (?x)^(?:(?P<exempt>_[a-z0-9_]+__|runTest|setUp|tearDown|setUpTestCase|tearDownTestCase|setupSelf|tearDownClass|setUpClass|(test|assert)_*[A-Z0-9][a-zA-Z0-9_]*|next)|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9_]*)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$
argument-rgx = ^[a-z][a-z0-9_]*$
attr-rgx = ^_{0,2}[a-z][a-z0-9_]*$
class-attribute-rgx = ^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
class-rgx = ^_?[A-Z][a-zA-Z0-9]*$
const-rgx = ^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$
inlinevar-rgx = ^[a-z][a-z0-9_]*$
module-rgx = ^(_?[a-z][a-z0-9_]*|__init__)$
no-docstring-rgx = (__.*__|main|test.*|.*test|.*Test)$
variable-rgx = ^[a-z][a-z0-9_]*$
docstring-min-length = 10
[logging]
logging-format-style=old
[miscellaneous]
notes=TODO
[STRING]
check-quote-consistency=yes
[TYPECHECK]
generated-members=shake_128s.*
ignored-modules=PyKCS11