From e259d5c3d7789850d31ed0a17b729fba5c34d94c Mon Sep 17 00:00:00 2001 From: Zedifus Date: Thu, 24 Mar 2022 19:34:11 +0000 Subject: [PATCH] Replace pylint build step with prebuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kudos to Robbert Müller https://gitlab.com/mjrider For implimenting my request to include the gitlab plugin for pylint This means we don't have to waste time installing anything --- .gitlab-ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d4fec225..b53a836e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,17 +52,16 @@ black: pylint: stage: lint - image: python:3.7-slim + image: registry.gitlab.com/pipeline-components/pylint:latest tags: - "docker" rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS" when: never - before_script: - # - mkdir -p public/badges public/lint - # - echo undefined > public/badges/$CI_JOB_NAME.score - - pip install pylint-gitlab + # before_script: + # - mkdir -p public/badges public/lint + # - echo undefined > public/badges/$CI_JOB_NAME.score script: # - pylint --exit-zero --output-format=text $(find -type f -name "*.py" ! -path "**/.venv/**" ! -path "**/app/migrations/**") | tee /tmp/pylint.txt # - sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' /tmp/pylint.txt > public/badges/$CI_JOB_NAME.score