mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 19:48:11 +08:00
Recognize 'busybox' in --shell and directives. Add to doc texts.
This commit is contained in:
@@ -211,6 +211,8 @@ prop_checkBashisms116 = verify checkBashisms "#!/bin/busybox sh\nx='test'\n${x[1
|
||||
prop_checkBashisms117 = verify checkBashisms "#!/bin/busybox sh\nx='test'\n${!x[@]}" -- SC3055
|
||||
prop_checkBashisms118 = verify checkBashisms "#!/bin/busybox sh\nxyz=1\n${!x*}" -- SC3056
|
||||
prop_checkBashisms119 = verify checkBashisms "#!/bin/busybox sh\nx='test'\n${x^^[t]}" -- SC3059
|
||||
prop_checkBashisms120 = verify checkBashisms "#!/bin/sh\n[ x == y ]"
|
||||
prop_checkBashisms121 = verifyNot checkBashisms "#!/bin/sh\n# shellcheck shell=busybox\n[ x == y ]"
|
||||
checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do
|
||||
params <- ask
|
||||
kludge params t
|
||||
|
@@ -156,6 +156,7 @@ shellForExecutable name =
|
||||
"sh" -> return Sh
|
||||
"bash" -> return Bash
|
||||
"bats" -> return Bash
|
||||
"busybox" -> return BusyboxSh -- Used for directives and --shell=busybox
|
||||
"busybox sh" -> return BusyboxSh
|
||||
"busybox ash" -> return BusyboxSh
|
||||
"dash" -> return Dash
|
||||
|
Reference in New Issue
Block a user