diff options
author | Bartek thindil Jasicki <thindil@laeran.pl> | 2021-01-08 09:43:19 +0100 |
---|---|---|
committer | Bartek thindil Jasicki <thindil@laeran.pl> | 2021-01-08 09:43:19 +0100 |
commit | 7b1ed2733e2b73a74149f300d5400225f535f490 (patch) | |
tree | b71be581af826a7f447b1c89897d7919106bf8df /test/handler/test_salt_salt_lint.vader | |
parent | 3fca5e73b605a07d3fdcf46cf24b1675aae5bca6 (diff) | |
parent | 54dd731cf14c809ebcc9c21b41084a17c5411744 (diff) | |
download | ale-7b1ed2733e2b73a74149f300d5400225f535f490.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/handler/test_salt_salt_lint.vader')
-rw-r--r-- | test/handler/test_salt_salt_lint.vader | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/handler/test_salt_salt_lint.vader b/test/handler/test_salt_salt_lint.vader new file mode 100644 index 00000000..7e234785 --- /dev/null +++ b/test/handler/test_salt_salt_lint.vader @@ -0,0 +1,34 @@ +Before: + runtime ale_linters/salt/salt_lint.vim + +After: + call ale#linter#Reset() + +Execute(The salt handler should parse lines correctly and show error in severity HIGH): + AssertEqual + \ [ + \ { + \ 'lnum': 5, + \ 'code': 207, + \ 'text': 'File modes should always be encapsulated in quotation marks', + \ 'type': 'E' + \ } + \ ], + \ ale_linters#salt#salt_lint#Handle(255, [ + \ '[{"id": "207", "message": "File modes should always be encapsulated in quotation marks", "filename": "test.sls", "linenumber": 5, "line": " - mode: 0755", "severity": "HIGH"}]' + \ ]) + + +Execute(The salt handler should parse lines correctly and show error in severity not HIGH): + AssertEqual + \ [ + \ { + \ 'lnum': 27, + \ 'code': 204, + \ 'text': 'Lines should be no longer that 160 chars', + \ 'type': 'W' + \ } + \ ], + \ ale_linters#salt#salt_lint#Handle(255, [ + \ '[{"id": "204", "message": "Lines should be no longer that 160 chars", "filename": "test2.sls", "linenumber": 27, "line": "this line is definitely longer than 160 chars, this line is definitely longer than 160 chars, this line is definitely longer than 160 chars", "severity": "VERY_LOW"}]' + \ ]) |