/ test / handler / test_swiftlint_handler.vader
test_swiftlint_handler.vader
 1  Before:
 2    runtime ale_linters/swift/swiftlint.vim
 3  
 4  After:
 5    call ale#linter#Reset()
 6  
 7  Execute(The swiftint handler should parse error messages correctly):
 8    AssertEqual
 9    \ [
10    \   {
11    \     'lnum': 1,
12    \     'col': 7,
13    \     'text': 'Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used.',
14    \     'code': 'operator_usage_whitespace',
15    \     'type': 'W',
16    \   },
17    \   {
18    \     'lnum': 1,
19    \     'col': 11,
20    \     'text': 'Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used.',
21    \     'code': 'operator_usage_whitespace',
22    \     'type': 'W',
23    \   },
24    \
25    \ ],
26    \ ale_linters#swift#swiftlint#Handle(bufnr(''), [
27    \   'This line should be ignored',
28    \   '<nopath>:1:7: warning: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace)',
29    \   '<nopath>:1:11: warning: Operator Usage Whitespace Violation: Operators should be surrounded by a single whitespace when they are being used. (operator_usage_whitespace)',
30    \ ])