mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
Check shell scripts for POSIX sh compliance
The hook functions and script might be executeted by busybox. Mark those files as POSIX sh for shellcheck. Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
This commit is contained in:
parent
6fc11ff9e3
commit
8510fabcde
@ -5,3 +5,8 @@ disable=SC1090
|
||||
# SC1091: Not following <file>
|
||||
# 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
|
||||
|
||||
2
debian/salsa-ci.yml
vendored
2
debian/salsa-ci.yml
vendored
@ -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: []
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# -*- shell-script -*-
|
||||
# shellcheck shell=sh
|
||||
|
||||
catenate_cpiogz() {
|
||||
# Sanity check
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# -*- shell-script -*-
|
||||
# shellcheck shell=sh
|
||||
|
||||
_log_msg()
|
||||
{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# Local filesystem mounting -*- shell-script -*-
|
||||
# shellcheck shell=sh
|
||||
|
||||
local_top()
|
||||
{
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# NFS filesystem mounting -*- shell-script -*-
|
||||
# shellcheck shell=sh
|
||||
|
||||
# FIXME This needs error checking
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user