Skip to content

Commit

Permalink
should run perfect on extreme
Browse files Browse the repository at this point in the history
  • Loading branch information
ssolson committed Feb 22, 2024
1 parent c2fc1a6 commit 50355de
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ jobs:
python -m pip install --upgrade pip
pip install pylint

- name: Run Pylint on mhkit/loads/ and check score
- name: Run Pylint on mhkit/loads/
run: |
# Run pylint and capture the output
pylint_output=$(pylint mhkit/loads/ --output-format=text || true)
echo "$pylint_output"
# Extract the score from the output, handling cases where score is not found
score=$(echo "$pylint_output" | grep "Your code has been rated at" | awk '{print $7}' | sed 's/\/10//' || echo "0")
echo "Pylint score: $score"
# Define the minimum acceptable score
min_score=7.0
# Check if score is a number, exit with code 1 (failure) if not
python -c "import sys; score='$score'; sys.exit(0 if score.replace('.', '', 1).isdigit() else 1)"
# Compare the score with the minimum acceptable score, exit with code 1 if below threshold
python -c "import sys; sys.exit(0 if float('$score') >= $min_score else 1)"
pylint mhkit/loads/exterme

0 comments on commit 50355de

Please sign in to comment.