3 from mozfile
import which
6 pytestmark
= pytest
.mark
.skipif(
7 not which("shellcheck"), reason
="shellcheck is not installed"
11 def test_basic(lint
, paths
):
12 results
= lint(paths())
14 assert len(results
) == 2
16 assert "hello appears unused" in results
[0].message
17 assert results
[0].level
== "error"
18 assert results
[0].relpath
== "bad.sh"
20 assert "Double quote to prevent" in results
[1].message
21 assert results
[1].level
== "error"
22 assert results
[1].relpath
== "bad.sh"
25 if __name__
== "__main__":