Skip to content

Commit de01926

Browse files
committed
fix(SC3003)!: remove SC3003 since ANSI C string is defined in POSIX.1-2024
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_02_04 dash v0.5.13 supports the feature resolve #1678, #3098
1 parent 29f0d8d commit de01926

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
### Fixed
77

88
### Removed
9+
- SC3003: removed since ANSI C string is specified in POSIX.1-2024
910

1011

1112
## v0.11.0 - 2025-08-03

src/ShellCheck/Checks/ShellSupport.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ prop_checkBashisms118 = verify checkBashisms "#!/bin/busybox sh\nxyz=1\n${!x*}"
213213
prop_checkBashisms119 = verify checkBashisms "#!/bin/busybox sh\nx='test'\n${x^^[t]}" -- SC3059
214214
prop_checkBashisms120 = verify checkBashisms "#!/bin/sh\n[ x == y ]"
215215
prop_checkBashisms121 = verifyNot checkBashisms "#!/bin/sh\n# shellcheck shell=busybox\n[ x == y ]"
216-
prop_checkBashisms122 = verify checkBashisms "#!/bin/dash\n$'a'"
216+
prop_checkBashisms122 = verifyNot checkBashisms "#!/bin/dash\n$'a'"
217217
prop_checkBashisms123 = verifyNot checkBashisms "#!/bin/busybox sh\n$'a'"
218218
prop_checkBashisms124 = verify checkBashisms "#!/bin/dash\ntype -p test"
219219
prop_checkBashisms125 = verifyNot checkBashisms "#!/bin/busybox sh\ntype -p test"
@@ -240,8 +240,6 @@ checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do
240240

241241
bashism (T_ProcSub id _ _) = warnMsg id 3001 "process substitution is"
242242
bashism (T_Extglob id _ _) = warnMsg id 3002 "extglob is"
243-
bashism (T_DollarSingleQuoted id _) =
244-
unless isBusyboxSh $ warnMsg id 3003 "$'..' is"
245243
bashism (T_DollarDoubleQuoted id _) = warnMsg id 3004 "$\"..\" is"
246244
bashism (T_ForArithmetic id _ _ _ _) = warnMsg id 3005 "arithmetic for loops are"
247245
bashism (T_Arithmetic id _) = warnMsg id 3006 "standalone ((..)) is"

0 commit comments

Comments
 (0)