Adds pylint_badge

This commit is contained in:
Richard Feistenauer 2020-10-25 20:03:46 +00:00
parent 2204c4a048
commit 9b939e51e7

View File

@ -11,7 +11,14 @@ stages:
pylint: pylint:
stage: Static Analysis stage: Static Analysis
script: script:
- pylint -d C0301 cellular_automaton/*.py - mkdir ./pylint
- pylint --output-format=text -d C0301 cellular_automaton/*.py | tee ./pylint/pylint.log || pylint-exit $?
- PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./pylint/pylint.log)
- anybadge --label=Pylint --file=pylint/pylint.svg --value=$PYLINT_SCORE 2=red 4=orange 8=yellow 10=green
- echo "Pylint score is $PYLINT_SCORE"
artifacts:
paths:
- ./pylint/
test: test:
stage: Test stage: Test