Allow disable=all to disable all warnings (fixes #2323)

This commit is contained in:
Vidar Holen 2021-09-18 12:50:01 -07:00
parent 9a54e91195
commit 09aa15c9b7
4 changed files with 15 additions and 1 deletions

View file

@ -306,6 +306,13 @@ prop_canDisableShebangWarning = null $ result
csScript = "#shellcheck disable=SC2148\nfoo"
}
prop_canDisableAllWarnings = result == [2086]
where
result = checkWithSpec [] emptyCheckSpec {
csFilename = "file.sh",
csScript = "#!/bin/sh\necho $1\n#shellcheck disable=all\necho `echo $1`"
}
prop_canDisableParseErrors = null $ result
where
result = checkWithSpec [] emptyCheckSpec {