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:
parent
08db2e948a
commit
58a3ee3f68
|
@ -10,7 +10,7 @@ variables:
|
|||
SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline
|
||||
BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base
|
||||
|
||||
check yamls:
|
||||
yamllint:
|
||||
stage: check input
|
||||
image: $BASE_CI_IMAGES:unstable
|
||||
dependencies: []
|
||||
|
@ -19,6 +19,15 @@ check yamls:
|
|||
- apt-get install -y yamllint
|
||||
- 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:
|
||||
stage: build
|
||||
image: $BASE_CI_IMAGES:unstable
|
||||
|
|
Loading…
Reference in New Issue