Skip to content
Snippets Groups Projects
Commit 7c2d0957 authored by Mayr, Hannes's avatar Mayr, Hannes
Browse files

Upgrade pylint job.

parent 1c80850e
No related branches found
No related tags found
1 merge request!68Resolve "Upgrade pylint job"
Pipeline #912155 failed
......@@ -28,8 +28,23 @@ Pylint:
stage: linting
needs: []
script:
- pip install pylint
- find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint
- mkdir -p public/badges public/lint
- echo undefined > public/badges/$CI_JOB_NAME.score
- pip install pylint-gitlab
- pylint --rcfile='plotid/.pylintrc' --output-format=text $(find -type f -name "*.py" ! -path "**/env*/**") | tee /tmp/pylint.txt
- sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' /tmp/pylint.txt > public/badges/$CI_JOB_NAME.score
- pylint --rcfile='plotid/.pylintrc' --output-format=pylint_gitlab.GitlabCodeClimateReporter $(find -type f -name "*.py" ! -path "**/env*/**") > codeclimate.json
- pylint --rcfile='plotid/.pylintrc' --output-format=pylint_gitlab.GitlabPagesHtmlReporter $(find -type f -name "*.py" ! -path "**/env*/**") > public/lint/index.html
after_script:
- anybadge --overwrite --label $CI_JOB_NAME --value=$(cat public/badges/$CI_JOB_NAME.score) --file=public/badges/$CI_JOB_NAME.svg 4=red 6=orange 8=yellow 10=green
- |
echo "Your score is: $(cat public/badges/$CI_JOB_NAME.score)"
artifacts:
paths:
- public
reports:
codequality: codeclimate.json
when: always
Autoformatting:
stage: linting
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment