Skip to content
Snippets Groups Projects
Commit 472e6e09 authored by Daniel Filipe Jana's avatar Daniel Filipe Jana
Browse files

Merge branch 'ci/adding-linters' into 'main'

Adding linters (should make components for this)

See merge request !33
parents 3fdf390c 798c59e7
No related branches found
No related tags found
1 merge request!33Adding linters (should make components for this)
Pipeline #253323 passed with warnings
......@@ -2,6 +2,8 @@
# yaml-language-server: $format.enable=false
stages:
- linters
- checkout
- environment
- compilers
- concretize
......@@ -104,7 +106,7 @@ variables:
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
spack:checkout:
stage: .pre
stage: checkout
variables:
APPTAINER_EXEC_OPTIONS: >-
--cleanenv
......@@ -257,3 +259,40 @@ post_cleaning:
- ${environment}
script:
- ./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
modules:
default:
lmod: {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment