ci: Add 'shellcheck' job to 'check input' stage

Check all the scripts, under 'rootfs/etc/initramfs-tools' (for now) with
'shellcheck'.
A couple of checks are excluded of which SC1090 and SC1091 will remain.
But SC2086 and especially SC2154 should be fixed! And when they are
fixed in the current code, those should be enabled again for checking.

Also rename 'check yamls' job to 'yamllint', so that's directly clear
which tool is being used.
This commit is contained in:
Diederik de Haas 2022-11-11 23:51:17 +01:00
parent 08db2e948a
commit 58a3ee3f68
No known key found for this signature in database
GPG Key ID: D76E5BCE787EDB6E
1 changed files with 10 additions and 1 deletions

11
debian/salsa-ci.yml vendored
View File

@ -10,7 +10,7 @@ variables:
SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline
BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base
check yamls: yamllint:
stage: check input stage: check input
image: $BASE_CI_IMAGES:unstable image: $BASE_CI_IMAGES:unstable
dependencies: [] dependencies: []
@ -19,6 +19,15 @@ check yamls:
- apt-get install -y yamllint - apt-get install -y yamllint
- yamllint -c debian/yamllint.yml . - yamllint -c debian/yamllint.yml .
shellcheck:
stage: check input
image: $BASE_CI_IMAGES:unstable
dependencies: []
script:
- apt-get update && apt-get upgrade -y
- apt-get install -y shellcheck
- shellcheck -e SC1090,SC1091,SC2086,SC2154 -s dash $(find rootfs/etc/initramfs-tools -type f -executable | xargs grep -l '^#!/bin/sh')
build yamls: build yamls:
stage: build stage: build
image: $BASE_CI_IMAGES:unstable image: $BASE_CI_IMAGES:unstable