2022-06-10 14:46:21 +00:00
|
|
|
# yamllint disable rule:line-length
|
2022-06-10 13:57:56 +00:00
|
|
|
---
|
2022-06-10 13:48:00 +00:00
|
|
|
# YAML Linting [https://yamllint.readthedocs.io/en/latest/]
|
2022-06-10 13:45:48 +00:00
|
|
|
yamllint:
|
|
|
|
stage: lint
|
|
|
|
image: registry.gitlab.com/pipeline-components/yamllint:latest
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
rules:
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CODE_QUALITY_DISABLED"
|
2022-06-10 13:45:48 +00:00
|
|
|
when: never
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
2022-06-10 13:45:48 +00:00
|
|
|
script:
|
|
|
|
- yamllint .
|
|
|
|
|
2022-06-10 13:48:00 +00:00
|
|
|
# JSON Linting [https://github.com/zaach/jsonlint]
|
2022-06-10 13:45:48 +00:00
|
|
|
jsonlint:
|
|
|
|
stage: lint
|
|
|
|
image: registry.gitlab.com/pipeline-components/jsonlint:latest
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
rules:
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CODE_QUALITY_DISABLED"
|
2022-06-10 13:45:48 +00:00
|
|
|
when: never
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
2022-06-10 13:45:48 +00:00
|
|
|
script:
|
|
|
|
- |
|
|
|
|
find . -not -path './.git/*' -name '*.json' -type f -print0 |
|
|
|
|
parallel --will-cite -k -0 -n1 jsonlint -q
|
|
|
|
|
2022-06-10 13:48:00 +00:00
|
|
|
# Code Format Checking [https://black.readthedocs.io/en/stable/]
|
2022-06-10 13:45:48 +00:00
|
|
|
black:
|
|
|
|
stage: lint
|
|
|
|
image: registry.gitlab.com/pipeline-components/black:latest
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
rules:
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CODE_QUALITY_DISABLED"
|
2022-06-10 13:45:48 +00:00
|
|
|
when: never
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
2022-06-10 13:45:48 +00:00
|
|
|
script:
|
|
|
|
- black --check --verbose -- .
|
|
|
|
|
2022-06-10 13:48:00 +00:00
|
|
|
# Code Climate/Quality Checking [https://pylint.pycqa.org/en/latest/]
|
2022-06-10 13:45:48 +00:00
|
|
|
pylint:
|
|
|
|
stage: lint
|
|
|
|
image: registry.gitlab.com/pipeline-components/pylint:latest
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
rules:
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CODE_QUALITY_DISABLED"
|
2022-06-10 13:45:48 +00:00
|
|
|
when: never
|
2022-06-10 13:48:00 +00:00
|
|
|
- if: "$CI_COMMIT_TAG || $CI_COMMIT_BRANCH"
|
2022-06-10 13:45:48 +00:00
|
|
|
script:
|
2022-09-19 22:31:01 +00:00
|
|
|
- pylint --exit-zero --load-plugins=pylint_gitlab --output-format=gitlab-codeclimate:codeclimate.json $(find -type f -name "*.py" ! -path "**/.venv/**" ! -path "**/app/migrations/**")
|
2022-06-10 13:45:48 +00:00
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
codequality: codeclimate.json
|
|
|
|
when: always
|