diff --git a/.github/workflows/meet.yml b/.github/workflows/meet.yml index b070b7d9..4b3b1f25 100644 --- a/.github/workflows/meet.yml +++ b/.github/workflows/meet.yml @@ -89,7 +89,7 @@ jobs: - name: Lint code with ruff run: ~/.local/bin/ruff check . - name: Lint code with pylint - run: ~/.local/bin/pylint . + run: ~/.local/bin/pylint meet demo core test-back: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 420a99b8..71b76471 100644 --- a/Makefile +++ b/Makefile @@ -141,7 +141,7 @@ lint-ruff-check: ## lint back-end python sources with ruff lint-pylint: ## lint back-end python sources with pylint only on changed files from main @echo 'lint:pylint started…' - bin/pylint --diff-only=origin/main + @$(COMPOSE_RUN_APP) pylint meet demo core .PHONY: lint-pylint test: ## run project tests diff --git a/bin/pylint b/bin/pylint deleted file mode 100755 index 8053c7c2..00000000 --- a/bin/pylint +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# shellcheck source=bin/_config.sh -source "$(dirname "${BASH_SOURCE[0]}")/_config.sh" - -declare diff_from -declare -a paths -declare -a args - -# Parse options -for arg in "$@" -do - case $arg in - --diff-only=*) - diff_from="${arg#*=}" - shift - ;; - -*) - args+=("$arg") - shift - ;; - *) - paths+=("$arg") - shift - ;; - esac -done - -if [[ -n "${diff_from}" ]]; then - # Run pylint only on modified files located in src/backend - # (excluding deleted files and migration files) - # shellcheck disable=SC2207 - paths=($(git diff "${diff_from}" --name-only --diff-filter=d -- src/backend ':!**/migrations/*.py' | grep -E '^src/backend/.*\.py$')) -fi - -# Fix docker vs local path when project sources are mounted as a volume -read -ra paths <<< "$(echo "${paths[@]}" | sed "s|src/backend/||g")" -_dc_run app-dev pylint "${paths[@]}" "${args[@]}"