Allow disabling SC1072/SC1073 with annotations (fixes #1931)

This commit is contained in:
Vidar Holen 2020-05-03 21:52:25 -07:00
parent d6adbfde78
commit c2a15ce8e9
3 changed files with 27 additions and 4 deletions

View file

@ -295,6 +295,13 @@ prop_canDisableShebangWarning = null $ result
csScript = "#shellcheck disable=SC2148\nfoo"
}
prop_canDisableParseErrors = null $ result
where
result = checkWithSpec [] emptyCheckSpec {
csFilename = "file.sh",
csScript = "#shellcheck disable=SC1073,SC1072,SC2148\n()"
}
prop_shExtensionDoesntMatter = result == [2148]
where
result = checkWithSpec [] emptyCheckSpec {