Skip to content

Commit

Permalink
linter action and updated pylint config
Browse files Browse the repository at this point in the history
  • Loading branch information
bnb32 committed Apr 26, 2024
1 parent cb9cc7c commit 70fd6d3
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 51 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint Code Base

on:
push:
branches-ignore:
- 'gh-pages'

jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Lint Code Base
uses: super-linter/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_MARKDOWN: false
VALIDATE_YAML: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164 changes: 113 additions & 51 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,52 +54,121 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=all
disable=
# Defaults
print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
import-star-module-level,
raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
consider-using-f-string,
unspecified-encoding,
# Custom
protected-access,
fixme,
redefined-outer-name,
redefined-builtin,
broad-except,
logging-format-interpolation,
logging-fstring-interpolation,
wrong-import-order,
wrong-import-position,
relative-beyond-top-level,
too-many-instance-attributes,
too-few-public-methods,
too-many-branches,
too-many-arguments,
too-many-locals,
too-many-statements,
too-many-nested-blocks,
invalid-name,
import-error,
bad-continuation,
try-except-raise,
no-else-raise,
no-else-return,
unexpected-keyword-arg,
no-value-for-parameter,
too-many-lines,
arguments-differ,
import-outside-toplevel,
super-init-not-called,
isinstance-second-argument-not-valid-type,
inconsistent-return-statements,
no-else-break,
too-many-public-methods,
too-many-function-args,
redundant-keyword-arg,
c-extension-no-member,
redefined-argument-from-local

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=unused-import,
unused-argument,
unused-variable,
unused-wildcard-import,
used-before-assignment,
undefined-variable,
undefined-all-variable,
missing-docstring,
empty-docstring,
unneeded-not,
singleton-comparison,
unidiomatic-typecheck,
consider-using-enumerate,
consider-iterating-dictionary,
no-member,
no-self-use,
duplicate-code,
len-as-condition,
missing-format-argument-key,
import-self,
reimported,
wildcard-import,
relative-import,
deprecated-module,
unpacking-non-sequence,
invalid-all-object,
undefined-all-variable,
used-before-assignment,
cell-var-from-loop,
global-variable-undefined,
redefine-in-handler,
global-variable-not-assigned,
undefined-loop-variable,
global-statement,
global-at-module-level,
bad-open-mode,
redundant-unittest-assert,
attribute-defined-outside-init,
unreachable

enable=

[REPORTS]

Expand Down Expand Up @@ -196,7 +265,7 @@ good-names=i,
_

# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
include-naming-hint=yes

# Naming style matching correct inline iteration names
inlinevar-naming-style=any
Expand Down Expand Up @@ -255,18 +324,11 @@ indent-after-paren=4
indent-string=' '

# Maximum number of characters on a single line.
max-line-length=100
max-line-length=79

# Maximum number of lines in a module
max-module-lines=1000

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
Expand Down Expand Up @@ -303,7 +365,7 @@ ignore-docstrings=yes
ignore-imports=yes

# Minimum lines number of a similarity.
min-similarity-lines=10
min-similarity-lines=20


[SPELLING]
Expand Down

0 comments on commit 70fd6d3

Please sign in to comment.