mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-26 15:00:35 +08:00
Use maybe instead of fromMaybe and fmap
This commit is contained in:
@@ -5020,7 +5020,7 @@ checkPlusEqualsNumber params t =
|
||||
let
|
||||
unquotedLiteral = getUnquotedLiteral word
|
||||
isEmpty = unquotedLiteral == Just ""
|
||||
isUnquotedNumber = not isEmpty && fromMaybe False (all isDigit <$> unquotedLiteral)
|
||||
isUnquotedNumber = not isEmpty && maybe False (all isDigit) unquotedLiteral
|
||||
isNumericalVariableName = fromMaybe False $ do
|
||||
str <- unquotedLiteral
|
||||
CF.variableMayBeAssignedInteger state str
|
||||
|
Reference in New Issue
Block a user