diff --git a/CHANGELOG.md b/CHANGELOG.md index 21cf075..384c7de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Added ### Changed - Most warnings now have useful end positions +- SC1117 about unknown double-quoted escape sequences has been retired ### Fixed - SC2021 no longer triggers for equivalence classes like '[=e=]' diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index 1255d7e..0a163ad 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -1254,7 +1254,6 @@ prop_readDoubleQuoted5 = isOk readSimpleCommand "lol \"foo\nbar\" etc" prop_readDoubleQuoted6 = isOk readSimpleCommand "echo \"${ ls; }\"" prop_readDoubleQuoted7 = isOk readSimpleCommand "echo \"${ ls;}bar\"" prop_readDoubleQuoted8 = isWarning readDoubleQuoted "\"\x201Chello\x201D\"" -prop_readDoubleQuoted9 = isWarning readDoubleQuoted "\"foo\\n\"" prop_readDoubleQuoted10 = isOk readDoubleQuoted "\"foo\\\\n\"" readDoubleQuoted = called "double quoted string" $ do start <- startSpan @@ -1440,8 +1439,9 @@ readDoubleEscaped = do <|> fmap return doubleQuotable <|> do c <- anyChar - parseNoteAt pos StyleC 1117 $ - "Backslash is literal in \"\\" ++ [c] ++ "\". Prefer explicit escaping: \"\\\\" ++ [c] ++ "\"." + -- This is an invalid escape sequence where the \ is literal. + -- Previously this caused a SC1117, which may be re-enabled as + -- as a pedantic warning. return [bs, c] readBraceEscaped = do @@ -1694,8 +1694,6 @@ prop_readHereDoc14= isWarning readScript "cat << foo\nbar\nfoo \n" prop_readHereDoc15= isWarning readScript "cat <