We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2349e5 commit 8449e1dCopy full SHA for 8449e1d
.github/workflows/pylint.yml
@@ -1,5 +1,3 @@
1
-name: Pylint
2
-
3
on: [push]
4
5
jobs:
@@ -20,4 +18,13 @@ jobs:
20
18
pip install pylint
21
19
pip install -r requirements.txt
22
- name: Analysing the code with pylint
23
- run: pylint --disable=C0114,C0115,C0116 --exit-zero scrapegraphai/**/*.py scrapegraphai/*.py
+ run: pylint --disable=C0114,C0115,C0116 --exit-zero scrapegraphai/**/*.py scrapegraphai/*.py
+ - name: Check Pylint score
+ run: |
24
+ pylint_score=$(pylint --disable=all --enable=metrics --output-format=text scrapegraphai/**/*.py scrapegraphai/*.py | grep 'Raw metrics' | awk '{print $4}')
25
+ if (( $(echo "$pylint_score < 8" | bc -l) )); then
26
+ echo "Pylint score is below 8. Blocking commit."
27
+ exit 1
28
+ else
29
+ echo "Pylint score is acceptable."
30
+ fi
0 commit comments