- linux
- amd64
+pytests:lint:
+ stage: test
+ dependencies: []
+ except:
+ - master
+ script:
+ - ./ci/pytests/lint.sh
+ tags:
+ - docker
+ - linux
+ - amd64
+
.respdiff: &respdiff
stage: respdiff
dependencies: []
--- /dev/null
+#!/bin/bash
+
+python3 -m flake8 --max-line-length=100 tests/pytests
+FLAKE8=$?
+
+ci/pytests/pylint-run.sh
+PYLINT=$?
+
+if [ $PYLINT -ne 0 ]; then
+ exit 1
+fi
+if [ $FLAKE8 -ne 0 ]; then
+ exit 1
+fi
+
+exit 0
--- /dev/null
+#!/usr/bin/env bash
+set -e
+
+# Find Python modules and standalone Python scripts
+FILES=$(find ./tests/pytests \
+ -type d -exec test -e '{}/__init__.py' \; -print -prune -o \
+ -name '*.py' -print)
+
+python3 -m pylint -j 0 --rcfile ./tests/pytests/pylintrc ${FILES}
--- /dev/null
+[MESSAGES CONTROL]
+
+disable=
+ missing-docstring,
+ too-many-arguments,
+ too-many-instance-attributes,
+ fixme,
+ unused-import, # checked by flake8
+ line-too-long, # checked by flake8
+ invalid-name,
+ broad-except,
+ bad-continuation,
+ global-statement,
+ no-else-return,
+ redefined-outer-name, # commonly used with pytest fixtures
+
+
+[SIMILARITIES]
+min-similarity-lines=6
+ignore-comments=yes
+ignore-docstrings=yes
+ignore-imports=no
+
+[DESIGN]
+max-parents=10
+
+[TYPECHECK]
+ignored-modules=ssl