Skip to content

Commit 7565a8b

Browse files
committed
ci: add a pylint badge
Signed-off-by: Davide Madrisan <d.madrisan@proton.me>
1 parent d89a81d commit 7565a8b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
version: "latest"
2121

2222
- name: Install Python dependencies
23-
run: pip install black flake8 pylint
23+
run: pip install anybadge black flake8 pylint
2424

2525
- name: Run linters
2626
uses: wearerequired/lint-action@v2
@@ -31,4 +31,7 @@ jobs:
3131

3232
- name: Analysing the code with pylint
3333
run: |
34-
uv run pylint $(git ls-files '*.py')
34+
uv run pylint --output-format=text ./**/*.py | tee pylint.txt
35+
score="$(sed -n "/^Your code has been rated at/{s,.* at \([0-9\.]*\)\/.*,\1,p}" pylint.txt)"
36+
uv run anybadge --label pylint --value "$score" --file="pylint.svg" --overwrite
37+

0 commit comments

Comments
 (0)