diff --git a/.shellcheckrc b/.shellcheckrc index 354e31d..e85e456 100644 --- a/.shellcheckrc +++ b/.shellcheckrc @@ -5,3 +5,8 @@ disable=SC1090 # SC1091: Not following # https://www.shellcheck.net/wiki/SC1091 disable=SC1091 + +# SC3043: In POSIX sh, local is undefined +# https://www.shellcheck.net/wiki/SC3043 +# ...but dash and BusyBox ash support it. +disable=SC3043 diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index 0b58047..e17993d 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -20,5 +20,5 @@ shellcheck: - apt-get update - apt-get install -y shellcheck - | - shellcheck -s dash hook-functions $(find hooks scripts -type f) $({ find . -maxdepth 1 -type f -executable; find debian -maxdepth 1 -type f; find docs kernel -type f; } | xargs grep -l '^#!/bin/sh') + shellcheck hook-functions $(find hooks scripts -type f) $({ find . -maxdepth 1 -type f -executable; find debian -maxdepth 1 -type f; find docs kernel -type f; } | xargs grep -l '^#!/bin/sh') needs: [] diff --git a/hook-functions b/hook-functions index 08c0364..f630004 100644 --- a/hook-functions +++ b/hook-functions @@ -1,4 +1,5 @@ # -*- shell-script -*- +# shellcheck shell=sh catenate_cpiogz() { # Sanity check diff --git a/scripts/functions b/scripts/functions index 60f9195..3d95f04 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1,4 +1,5 @@ # -*- shell-script -*- +# shellcheck shell=sh _log_msg() { diff --git a/scripts/local b/scripts/local index 8f9597f..78653af 100644 --- a/scripts/local +++ b/scripts/local @@ -1,4 +1,5 @@ # Local filesystem mounting -*- shell-script -*- +# shellcheck shell=sh local_top() { diff --git a/scripts/nfs b/scripts/nfs index 26a969b..f7dc89f 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -1,4 +1,5 @@ # NFS filesystem mounting -*- shell-script -*- +# shellcheck shell=sh # FIXME This needs error checking