-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Features * Add a generic pylintrc * Add clang-tidy to build-debian Bug: N/A Change-Id: I83c7cfeb47847bae68d0555ba46ff207b2de71e4 GitOrigin-RevId: 4534cb12a6e13382379cd766db7cef4acac099a3
- Loading branch information
Showing
6 changed files
with
147 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Checks: > | ||
-*, | ||
bugprone-*, | ||
-bugprone-narrowing-conversions, | ||
performance-*, | ||
WarningsAsErrors: '*' | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
[MESSAGES CONTROL] | ||
|
||
# List of checkers and warnings to enable. | ||
enable= | ||
indexing-exception, | ||
old-raise-syntax, | ||
|
||
# List of checkers and warnings to disable. | ||
# TODO: Shrink this list to as small as possible. | ||
disable= | ||
attribute-defined-outside-init, | ||
bad-option-value, | ||
bare-except, | ||
broad-except, | ||
c-extension-no-member, | ||
design, | ||
file-ignored, | ||
fixme, | ||
global-statement, | ||
import-error, | ||
import-outside-toplevel, | ||
locally-disabled, | ||
misplaced-comparison-constant, | ||
multiple-imports, | ||
no-self-use, | ||
relative-import, | ||
similarities, | ||
suppressed-message, | ||
ungrouped-imports, | ||
unsubscriptable-object, | ||
useless-object-inheritance, # Remove once all bots are on Python 3. | ||
useless-suppression, | ||
wrong-import-order, | ||
wrong-import-position, | ||
# FIXME: To be removed. Leftovers from Python 3 migration. | ||
consider-using-with, | ||
raise-missing-from, | ||
super-with-arguments, | ||
use-a-generator, | ||
consider-using-generator, | ||
consider-using-f-string, # Too much legacy usages. | ||
unspecified-encoding, # Too much legacy usage. | ||
broad-exception-raised, | ||
|
||
[BASIC] | ||
|
||
# Regular expression which should only match the name | ||
# of functions or classes which do not require a docstring. | ||
no-docstring-rgx=(__.*__|main) | ||
|
||
# Min length in lines of a function that requires a docstring. | ||
docstring-min-length=10 | ||
|
||
# Regular expression which should only match correct module names. The | ||
# leading underscore is sanctioned for private modules by Google's style | ||
# guide. | ||
# | ||
# There are exceptions to the basic rule (_?[a-z][a-z0-9_]*) to cover | ||
# requirements of Python's module system and of the presubmit framework. | ||
module-rgx=^(_?[a-z][a-z0-9_]*)|__init__|__main__|PRESUBMIT|PRESUBMIT_unittest$ | ||
|
||
# Regular expression which should only match correct module level names. | ||
const-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ | ||
|
||
# Regular expression which should only match correct class attribute. | ||
class-attribute-rgx=^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ | ||
|
||
# Regular expression which should only match correct class names. | ||
class-rgx=^_?[A-Z][a-zA-Z0-9]*$ | ||
|
||
# Regular expression which should only match correct function names. | ||
# 'camel_case' and 'snake_case' group names are used for consistency of naming | ||
# styles across functions and methods. | ||
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_]*))$ | ||
|
||
# Regular expression which should only match correct method names. | ||
# 'camel_case' and 'snake_case' group names are used for consistency of naming | ||
# styles across functions and methods. 'exempt' indicates a name which is | ||
# consistent with all naming styles. | ||
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_]*))$ | ||
|
||
# Regular expression which should only match correct instance attribute names. | ||
attr-rgx=^_{0,2}[a-z][a-z0-9_]*$ | ||
|
||
# Regular expression which should only match correct argument names. | ||
argument-rgx=^[a-z][a-z0-9_]*$ | ||
|
||
# Regular expression which should only match correct variable names. | ||
variable-rgx=^[a-z][a-z0-9_]*$ | ||
|
||
# Regular expression which should only match correct list comprehension / | ||
# generator expression variable names. | ||
inlinevar-rgx=^[a-z][a-z0-9_]*$ | ||
|
||
# Good variable names which should always be accepted, separated by a comma. | ||
good-names=main,_,maxDiff | ||
|
||
# Bad variable names which should always be refused, separated by a comma. | ||
bad-names= | ||
|
||
# FIXME: Renable this. | ||
# List of builtins function names that should not be used, separated by a comma. | ||
#bad-builtin=input | ||
|
||
[FORMAT] | ||
|
||
# Maximum number of characters on a single line. | ||
max-line-length=90 | ||
|
||
# Maximum number of lines in a module | ||
max-module-lines=99999 | ||
|
||
[TYPECHECK] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
b1a855c1b44e4c7ae00a9c51ffc3d9fe28785ef887707100a9bdd510541144ec | ||
38cc8a23a6a56eb6567bef3685100cd3be1c0491dcc8b953993c42182da3fa40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.56.0 | ||
0.57.0 |