Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / tools / lint / test / test_shellcheck.py
blob1b41e298bd36bd233648a0519109b12c87ce7af2
1 import mozunit
2 import pytest
3 from mozfile import which
5 LINTER = "shellcheck"
6 pytestmark = pytest.mark.skipif(
7 not which("shellcheck"), reason="shellcheck is not installed"
11 def test_basic(lint, paths):
12 results = lint(paths())
13 print(results)
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__":
26 mozunit.main()