From 58a3ee3f6846951a3251b40b009181c995ef2611 Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Fri, 11 Nov 2022 23:51:17 +0100 Subject: [PATCH] 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. --- debian/salsa-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index f43a844..0c2b324 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -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