Commit fa77131d authored by Federico Falconieri's avatar Federico Falconieri
Browse files

Merge branch 'hoverht-master-patch-88185' into 'master'

fix: allow module as target for pylint

See merge request ci/templates!99
parents e03a0e3b 056a0b1c
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -6,13 +6,9 @@
# [tool.pylint.messages_control]
# disable = ["C0114", "C0115", "unsubscriptable-object", "too-many-lines"]

# This variable tells the kaniko job to add
# python testing packages to a separate testing image

python:pylint:
  variables:
    PYLINT_THRESHOLD: "6"
    CHECK_PATH: "./${PYTHON_PACKAGE}"
    EXTRA_ARGS: ""
  stage: test
  image: registry.gitlab.com/notno/python-tests
@@ -20,8 +16,13 @@ python:pylint:
    - pip install .
  script:
    - pip install pylint pylint-junit
    - pylint --output-format=pylint_junit.JUnitReporter $(find ${CHECK_PATH} -type f -name '*.py' -print) > ${CI_PROJECT_DIR}/pylint-report.xml || true
    - pylint ${EXTRA_ARGS} --output-format=colorized --fail-under ${PYLINT_THRESHOLD} $(find ${CHECK_PATH} -type f -name '*.py' -print)
    - |
      if [ -z "${PYTHON_PACKAGE}" ]; then
        CHECK="$(find ./ -type f -name '*.py' -print)"
      else
        CHECK="${PYTHON_PACKAGE}"
      fi
    - pylint --output-format=pylint_junit.JUnitReporter:${CI_PROJECT_DIR}/pylint-report.xml,colorized --fail-under ${PYLINT_THRESHOLD} ${EXTRA_ARGS} ${CHECK}
  artifacts:
    reports:
      junit: pylint-report.xml