Include shebang in AST traversal (fixes #1858)

This commit is contained in:
Vidar Holen 2020-03-16 21:36:41 -07:00
parent acee69676b
commit 7963eeab9d
2 changed files with 12 additions and 1 deletions

View file

@ -288,6 +288,13 @@ prop_deducesTypeFromExtension2 = result == [2079]
csScript = "(( 3.14 ))"
}
prop_canDisableShebangWarning = null $ result
where
result = checkWithSpec [] emptyCheckSpec {
csFilename = "file.sh",
csScript = "#shellcheck disable=SC2148\nfoo"
}
prop_shExtensionDoesntMatter = result == [2148]
where
result = checkWithSpec [] emptyCheckSpec {