diff options
author | Benjamin Binier <poulpatine@gmail.com> | 2020-12-17 08:59:57 +0100 |
---|---|---|
committer | Benjamin Binier <poulpatine@gmail.com> | 2020-12-17 09:19:19 +0100 |
commit | e358afdd9ba5108680afc6aa017075b44f6c18fa (patch) | |
tree | d35e4ba8e3fd90a304558ab32fe11f928faadcd9 /test | |
parent | f996ede5999c99b1b3e3cecc02dbd06cb286d3ff (diff) | |
download | ale-e358afdd9ba5108680afc6aa017075b44f6c18fa.zip |
Add salt-lint support
Diffstat (limited to 'test')
-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"}]' + \ ]) |