Skip to content
Snippets Groups Projects
Commit 14b47810 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Activate django support for linter

parent 6647f4c7
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ before_script: ...@@ -23,7 +23,7 @@ before_script:
- mkdir -p public/badges public/lint - mkdir -p public/badges public/lint
- echo undefined > public/badges/$CI_JOB_NAME.score - echo undefined > public/badges/$CI_JOB_NAME.score
- source venv/bin/activate - source venv/bin/activate
- pip install pylint-gitlab - pip install pylint-gitlab pylint-django
- mysql --version - mysql --version
check: check:
...@@ -56,10 +56,10 @@ test: ...@@ -56,10 +56,10 @@ test:
lint: lint:
stage: test stage: test
script: script:
- pylint --exit-zero --output-format=text $(find -type f -name "*.py" ! -path "**/venv/**") | tee /tmp/pylint.txt - pylint --load-plugins pylint_django --exit-zero --output-format=text $(find -type f -name "*.py" ! -path "**/venv/**") | 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 - sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' /tmp/pylint.txt > public/badges/$CI_JOB_NAME.score
- pylint --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter $(find -type f -name "*.py" ! -path "**/venv/**") > codeclimate.json - pylint --load-plugins pylint_django --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter $(find -type f -name "*.py" ! -path "**/venv/**") > codeclimate.json
- pylint --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter $(find -type f -name "*.py" ! -path "**/venv/**") > public/lint/index.html - pylint --load-plugins pylint_django --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter $(find -type f -name "*.py" ! -path "**/venv/**") > public/lint/index.html
after_script: after_script:
- | - |
echo "Linting score: $(cat public/badges/$CI_JOB_NAME.score)" echo "Linting score: $(cat public/badges/$CI_JOB_NAME.score)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment