Skip to content
Snippets Groups Projects
Commit 1a9f8c45 authored by Nicolas Richart's avatar Nicolas Richart
Browse files

Adding linters (should make components for this)

parent 3fdf390c
No related branches found
No related tags found
1 merge request!33Adding linters (should make components for this)
Pipeline #253164 canceled
...@@ -8,6 +8,7 @@ stages: ...@@ -8,6 +8,7 @@ stages:
- install - install
- release - release
- deploy - deploy
- linters
workflow: workflow:
rules: rules:
...@@ -257,3 +258,40 @@ post_cleaning: ...@@ -257,3 +258,40 @@ post_cleaning:
- ${environment} - ${environment}
script: script:
- ./ci/cleaning_fs.sh - ./ci/cleaning_fs.sh
.code-quality: &code-climate
stage: linters
image:
name: registry.hpc.epfl.ch/scitas/linters-collection:latest
pull_policy: always
allow_failure: true
after_script:
- |
if [ ! -s gl-codequality.json ]; then
echo [] | tee gl-codequality.json | jq -C .;
fi
artifacts:
reports:
codequality: [gl-codequality.json]
paths:
- gl-codequality.json
cq:hadolint:
<<: *code-climate
script:
- hadolint --format codeclimate dockerfiles/**/Dockerfile | tee gl-codequality.json | jq -C .
cq:shellcheck:
<<: *code-climate
script:
- |
git ls-files . \
| xargs -r -n1 file \
| awk -F: '/shell script/{print $1}' \
| xargs -r -n1 shellcheck -f json \
| tee -a gl-codequality.json | jq -C .
cq:yamllint:
<<: *code-climate
script:
- yamllint_codeclimate --standalone | tee gl-codequality.json | jq -C .
---
failure-threshold: "style" # name of threshold level (error | warning | info | style | ignore | none)
format: "codeclimate" # Output format (tty | json | checkstyle | codeclimate | gitlab_codeclimate | gnu | codacy)
ignored: ["DL3041"] # list of rules
no-color: false # true | false
strict-labels: true # true | false
trustedRegistries:
- "registry.hpc.epfl.ch" # registry or list of registries
- "docker.io"
---
extends: default
rules:
line-length:
ignore:
- .hadolint.yaml
- .gitlab-ci.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment