From c158e65192d6133373f3de7ffc907d9497b881a6 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 8 Sep 2021 22:01:49 +0200 Subject: [PATCH] ci: added pylint (triggered upon error w/ score < 8 only) --- .drone.yml | 8 +++++++- .pylintrc | 50 +++++++++++++++++++++++++++++++++++++++++++++++ morss/__init__.py | 3 +++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .pylintrc diff --git a/.drone.yml b/.drone.yml index bda56d4..e69bc05 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,8 +2,14 @@ kind: pipeline name: default steps: -- name: lint +- name: isort image: python:alpine commands: - pip install isort - isort --check-only --diff . +- name: pylint + image: python:alpine + commands: + - apk add --no-cache py3-lxml + - pip install . + - pylint morss --rcfile=.pylintrc --disable=C,R,W --fail-under=8 diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..579326e --- /dev/null +++ b/.pylintrc @@ -0,0 +1,50 @@ +[MASTER] +ignore=CVS +suggestion-mode=yes +extension-pkg-allow-list=lxml.etree + +[MESSAGES CONTROL] +disable=missing-function-docstring, + missing-class-docstring, + missing-module-docstring, + wrong-spelling-in-comment, + +[REPORTS] +reports=yes +score=yes + +[SPELLING] +spelling-dict=en_GB +spelling-ignore-words=morss + +[STRING] +check-quote-consistency=yes +check-str-concat-over-line-jumps=yes + +[VARIABLES] +allow-global-unused-variables=no +init-import=no + +[FORMAT] +expected-line-ending-format=LF +indent-string=' ' +max-line-length=120 +max-module-lines=1000 + +[BASIC] +argument-naming-style=snake_case +attr-naming-style=snake_case +class-attribute-naming-style=snake_case +class-const-naming-style=UPPER_CASE +class-naming-style=PascalCase +const-naming-style=UPPER_CASE +function-naming-style=snake_case +inlinevar-naming-style=snake_case +method-naming-style=snake_case +module-naming-style=snake_case +variable-naming-style=snake_case + +include-naming-hint=yes + +bad-names=foo, bar +good-names=i, j, k diff --git a/morss/__init__.py b/morss/__init__.py index 179cbeb..de0ba4d 100644 --- a/morss/__init__.py +++ b/morss/__init__.py @@ -16,5 +16,8 @@ # with this program. If not, see . # ran on `import morss` + +# pylint: disable=unused-import,unused-variable + from .morss import * from .wsgi import application