From 004b7999419aa83c664db98cb3fb436c34ea774c Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Wed, 29 Jul 2026 06:05:42 +0900 Subject: [PATCH] fix(SC3001): do not warn about process substitution in the case of busybox sh resolve #3299 --- src/ShellCheck/Checks/ShellSupport.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ShellCheck/Checks/ShellSupport.hs b/src/ShellCheck/Checks/ShellSupport.hs index 9259fe5ee..1327907db 100644 --- a/src/ShellCheck/Checks/ShellSupport.hs +++ b/src/ShellCheck/Checks/ShellSupport.hs @@ -245,6 +245,7 @@ prop_checkBashisms147 = verify checkBashisms "[ -R ref ]" -- SC3063 prop_checkBashisms148 = verify checkBashisms "[ -N file ]" -- SC3064 prop_checkBashisms149 = verify checkBashisms "[ -G file ]" -- SC3066 prop_checkBashisms150 = verify checkBashisms "[ -O file ]" -- SC3067 +prop_checkBashisms151 = verifyNot checkBashisms "#!/bin/busybox sh\npwd | tee >(gzip > log.gz)" -- SC3001 checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do params <- ask kludge params t @@ -260,7 +261,7 @@ checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do else warn id code $ "In POSIX sh, " ++ s ++ " undefined." asStr = getLiteralString - bashism (T_ProcSub id _ _) = warnMsg id 3001 "process substitution is" + bashism (T_ProcSub id _ _) = unless isBusyboxSh $ warnMsg id 3001 "process substitution is" bashism (T_Extglob id _ _) = warnMsg id 3002 "extglob is" bashism (T_DollarDoubleQuoted id _) = warnMsg id 3004 "$\"..\" is" bashism (T_ForArithmetic id _ _ _ _) = warnMsg id 3005 "arithmetic for loops are"