From 4619c9d1ecab91586a2a039fd9de06d1071353ac Mon Sep 17 00:00:00 2001 From: proletarius101 Date: Mon, 12 Feb 2024 16:49:13 +0800 Subject: [PATCH] ci: use upstream pylint as codeclimate-pylint is deprecated and doesn't support pyproject.toml --- .codeclimate.yml | 11 ----------- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index ad811609..202cabfa 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,17 +1,6 @@ --- version: "2" plugins: - pylint: - enabled: true - exclude_patterns: - - "**/*" - - "!fdroid" - - "!makebuildserver" - - "!setup.py" - - "!fdroidserver/*.py" - - "!tests/*.py" - - "!tests/*.TestCase" - shellcheck: enabled: true # Only include tests/run-tests diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82f20ca4..b99e1108 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -245,6 +245,7 @@ code_quality: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run code quality job in pipelines on the default branch (but not in other branch pipelines) - if: $CI_COMMIT_TAG # Run code quality job in pipelines for tags + code_quality_html: extends: code_quality variables: @@ -252,6 +253,27 @@ code_quality_html: artifacts: paths: [gl-code-quality-report.html] + +pylint: + image: debian:bookworm-slim + script: + - apt-get update + - apt-get -y install --no-install-recommends \ + python3-pip + pylint + - $pip install pylint-gitlab + - pylint --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter + fdroid + makebuildserver + setup.py + fdroidserver/*.py + tests/*.py + tests/*.TestCase > pylint-report.json + artifacts: + reports: + codequality: pylint-report.json + + # Run all the various linters and static analysis tools. locales: image: debian:bookworm-slim