Skip to content

Commit

Permalink
updated pylint_parser
Browse files Browse the repository at this point in the history
  • Loading branch information
97gamjak committed Apr 29, 2024
1 parent e2f5ed3 commit d7ebac2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/parse_pylint.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import sys


def main(lines):
lines = lines.split("\n")
def main(file):
with open(file, "r", encoding="utf-8") as f:
lines = f.readlines()

summary = [line for line in lines if line.startswith(
"Your code has been rated at")][0]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
- name: Lint with pylint
shell: bash
run: |
OUTPUT=$(pylint PQAnalysis --exit-zero)
python .github/scripts/parse_pylint.py $OUTPUT | tee comment.txt
pylint PQAnalysis --exit-zero) | tee pylint_output.txt
python .github/scripts/parse_pylint.py pylint_output.txt | tee comment.txt
- uses: marocchino/sticky-pull-request-comment@v2
if: (success() || failure()) && github.event.pull_request
Expand Down

0 comments on commit d7ebac2

Please sign in to comment.