Fix haddock failures (fixes #2216)
This commit is contained in:
parent
d47f3ff986
commit
9e60b3ea84
|
@ -4155,11 +4155,11 @@ checkEqualsInCommand params originalToken =
|
||||||
_ | "===" `isPrefixOf` s -> borderMsg (getId originalToken)
|
_ | "===" `isPrefixOf` s -> borderMsg (getId originalToken)
|
||||||
_ -> prefixMsg (getId cmd)
|
_ -> prefixMsg (getId cmd)
|
||||||
|
|
||||||
-- $var==42
|
-- '$var==42'
|
||||||
_ | "==" `isInfixOf` s ->
|
_ | "==" `isInfixOf` s ->
|
||||||
badComparisonMsg (getId cmd)
|
badComparisonMsg (getId cmd)
|
||||||
|
|
||||||
-- ${foo[x]}=42 and $foo=42
|
-- '${foo[x]}=42' and '$foo=42'
|
||||||
[T_DollarBraced id braced l] | "=" `isPrefixOf` s -> do
|
[T_DollarBraced id braced l] | "=" `isPrefixOf` s -> do
|
||||||
let variableStr = concat $ oversimplify l
|
let variableStr = concat $ oversimplify l
|
||||||
let variableReference = getBracedReference variableStr
|
let variableReference = getBracedReference variableStr
|
||||||
|
@ -4172,22 +4172,22 @@ checkEqualsInCommand params originalToken =
|
||||||
&& "]" `isSuffixOf` variableModifier
|
&& "]" `isSuffixOf` variableModifier
|
||||||
|
|
||||||
case () of
|
case () of
|
||||||
-- $foo=bar should already have caused a parse-time SC1066
|
-- '$foo=bar' should already have caused a parse-time SC1066
|
||||||
-- _ | not braced && isPlain ->
|
-- _ | not braced && isPlain ->
|
||||||
-- return ()
|
-- return ()
|
||||||
|
|
||||||
_ | variableStr == "" -> -- Don't try to fix ${}=foo
|
_ | variableStr == "" -> -- Don't try to fix ${}=foo
|
||||||
genericMsg (getId cmd)
|
genericMsg (getId cmd)
|
||||||
|
|
||||||
-- $#=42 or ${#var}=42
|
-- '$#=42' or '${#var}=42'
|
||||||
_ | "#" `isPrefixOf` variableStr ->
|
_ | "#" `isPrefixOf` variableStr ->
|
||||||
genericMsg (getId cmd)
|
genericMsg (getId cmd)
|
||||||
|
|
||||||
-- ${0}=42
|
-- '${0}=42'
|
||||||
_ | variableStr == "0" ->
|
_ | variableStr == "0" ->
|
||||||
assign0Msg id $ fixWith [replaceToken id params "BASH_ARGV0"]
|
assign0Msg id $ fixWith [replaceToken id params "BASH_ARGV0"]
|
||||||
|
|
||||||
-- $2=2
|
-- '$2=2'
|
||||||
_ | isPositional ->
|
_ | isPositional ->
|
||||||
positionalMsg id
|
positionalMsg id
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@ cabal build ||
|
||||||
die "build failed"
|
die "build failed"
|
||||||
cabal test ||
|
cabal test ||
|
||||||
die "test failed"
|
die "test failed"
|
||||||
|
cabal haddock ||
|
||||||
|
die "haddock failed"
|
||||||
|
|
||||||
sc="$(find . -name shellcheck -type f -perm -111)"
|
sc="$(find . -name shellcheck -type f -perm -111)"
|
||||||
[ -x "$sc" ] || die "Can't find executable"
|
[ -x "$sc" ] || die "Can't find executable"
|
||||||
|
|
Loading…
Reference in New Issue