mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-10 22:47:43 +08:00
Don't suggest removing $ in (( ${COLUMNS-80} ))
This commit is contained in:
@@ -1369,7 +1369,7 @@ checkArithmeticDeref params t@(TA_Expansion _ [b@(T_DollarBraced id _)]) =
|
|||||||
unless (isException $ bracedString b) getWarning
|
unless (isException $ bracedString b) getWarning
|
||||||
where
|
where
|
||||||
isException [] = True
|
isException [] = True
|
||||||
isException s = any (`elem` "/.:#%?*@$") s || isDigit (head s)
|
isException s = any (`elem` "/.:#%?*@$-") s || isDigit (head s)
|
||||||
getWarning = fromMaybe noWarning . msum . map warningFor $ parents params t
|
getWarning = fromMaybe noWarning . msum . map warningFor $ parents params t
|
||||||
warningFor t =
|
warningFor t =
|
||||||
case t of
|
case t of
|
||||||
|
Reference in New Issue
Block a user