Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ ignore =
C901 # code flow is too complex, too many violations, to be removed in the future
W503 # line break before binary operator effect on readability is subjective
W504 # line break after binary operator effect on readability is subjective
# new added
E117 # over-indented
E252 # missing whitespace around parameter equals
F541 # f-string is missing placeholders
F821 # undefined name 'command'
F841 # local variable 'e' is assigned to but never used
W605 # invalid escape sequence

exclude =
*/vendored_sdks
docs
Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ jobs:
vmImage: 'ubuntu-20.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
displayName: 'Use Python 3.10'
inputs:
versionSpec: 3.6
- bash: pip install wheel==0.30.0 pylint==1.9.5 flake8==3.5.0 requests
versionSpec: 3.10
- bash: pip install wheel==0.30.0 pylint==2.11.1 flake8 requests
displayName: 'Install wheel, pylint, flake8, requests'
- bash: python scripts/ci/source_code_static_analysis.py
displayName: "Static Analysis"
Expand Down
126 changes: 118 additions & 8 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,130 @@ reports=no

[MESSAGES CONTROL]
# For all codes, run 'pylint --list-msgs' or go to 'https://pylint.readthedocs.io/en/latest/reference_guide/features.html'
# locally-disabled: Warning locally suppressed using disable-msg
# cyclic-import: Because of https://github.com/PyCQA/pylint/issues/850
# too-many-arguments: Due to the nature of the CLI many commands have large arguments set which reflect in large arguments set in corresponding methods.
# import-outside-toplevel: Lazy import to improve performance
# locally-disabled: Warning locally suppressed using disable-msg
# too-many-arguments: Due to the nature of the CLI many commands have large arguments set which reflect in large arguments set in corresponding methods.
# consider-using-f-string: str.format is still a Python standard
# unspecified-encoding: Allow using the system encoding, instead of forcing utf-8 to avoid opening errors
disable=
missing-docstring,
locally-disabled,
fixme,
arguments-out-of-order,
arguments-renamed,
bad-option-value,
consider-using-dict-items,
consider-using-enumerate,
consider-using-f-string,
consider-using-in,
consider-using-with,
cyclic-import,
too-many-arguments,
invalid-name,
duplicate-code,
fixme,
import-outside-toplevel,
too-many-lines
inconsistent-return-statements,
invalid-name,
invalid-str-returned,
locally-disabled,
missing-docstring,
missing-kwoa,
no-member,
no-value-for-parameter,
raise-missing-from,
raising-bad-type,
redundant-u-string-prefix,
subprocess-run-check,
super-with-arguments,
too-many-arguments,
too-many-function-args,
too-many-lines,
unspecified-encoding,
unused-private-member,
use-dict-literal,
use-maxsplit-arg,
used-before-assignment
using-constant-test,
wrong-import-order,
# new added
anomalous-backslash-in-string,
arguments-differ,
assignment-from-no-return,
attribute-defined-outside-init,
bad-indentation,
bad-mcs-classmethod-argument,
bad-mcs-method-argument,
bare-except,
broad-except,
chained-comparison,
condition-evals-to-constant,
consider-using-from-import,
consider-using-sys-exit,
consider-using-ternary,
deprecated-method,
duplicate-string-formatting-argument,
expression-not-assigned,
f-string-without-interpolation,
function-redefined,
global-variable-not-assigned,
import-error,
keyword-arg-before-vararg,
line-too-long,
logging-fstring-interpolation,
logging-not-lazy,
misplaced-comparison-constant,
missing-final-newline,
multiple-imports,
multiple-statements,
no-else-break,
no-else-continue,
no-else-raise,
no-else-return,
no-name-in-module,
no-self-argument,
no-self-use,
pointless-statement,
pointless-string-statement,
possibly-unused-variable,
protected-access,
redefined-argument-from-local,
redefined-builtin,
redefined-outer-name,
redundant-unittest-assert,
reimported,
simplifiable-if-expression,
simplifiable-if-statement,
superfluous-parens,
syntax-error,
too-few-public-methods,
too-many-boolean-expressions,
too-many-branches,
too-many-format-args,
too-many-instance-attributes,
too-many-locals,
too-many-nested-blocks,
too-many-public-methods,
too-many-return-statements,
too-many-statements,
trailing-comma-tuple,
trailing-newlines,
trailing-whitespace,
undefined-variable,
ungrouped-imports,
unidiomatic-typecheck,
unnecessary-comprehension,
unnecessary-pass,
unrecognized-inline-option,
unsubscriptable-object,
unsupported-membership-test,
unused-argument,
unused-import,
unused-variable,
unused-wildcard-import,
use-a-generator,
use-list-literal,
useless-object-inheritance,
useless-return,
useless-super-delegation,
wildcard-import,
wrong-import-position,

[TYPECHECK]
# For Azure CLI extensions, we ignore some import errors as they'll be available in the environment of the CLI
Expand Down