From 7565a8b43d8558d4b87852b97f6a23c044884ce8 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Sun, 22 Dec 2024 11:28:22 +0100 Subject: [PATCH] ci: add a pylint badge Signed-off-by: Davide Madrisan --- .github/workflows/ci.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 240759f..e9b9786 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ jobs: version: "latest" - name: Install Python dependencies - run: pip install black flake8 pylint + run: pip install anybadge black flake8 pylint - name: Run linters uses: wearerequired/lint-action@v2 @@ -31,4 +31,7 @@ jobs: - name: Analysing the code with pylint run: | - uv run pylint $(git ls-files '*.py') + uv run pylint --output-format=text ./**/*.py | tee pylint.txt + score="$(sed -n "/^Your code has been rated at/{s,.* at \([0-9\.]*\)\/.*,\1,p}" pylint.txt)" + uv run anybadge --label pylint --value "$score" --file="pylint.svg" --overwrite +