Skip to content

Commit 6cd9646

Browse files
authored
Enhance pylint workflow with score extraction
Added steps to extract pylint score and set badge label.
1 parent e417155 commit 6cd9646

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ jobs:
2121
- name: Analysing the code with pylint
2222
run: |
2323
pylint $(git ls-files '*.py')
24+
- name: Extract score
25+
id: extract_score
26+
run: |
27+
score=$(grep "rated at" pylint-output.txt | sed -E 's/.*rated at ([0-9]+\.[0-9]+)\/10.*/\1/')
28+
echo "score=$score" >> $GITHUB_OUTPUT
29+
- name: Set badge label (optional)
30+
run: |
31+
echo "::set-output name=badge_url::https://img.shields.io/badge/pylint-${{ steps.extract_score.outputs.score }}%2F10-brightgreen"

0 commit comments

Comments
 (0)