]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/handler/test_erlang_elvis_handler.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / handler / test_erlang_elvis_handler.vader
1 Before:
2   runtime ale_linters/erlang/elvis.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(Warning messages should be handled):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': 11,
12   \     'text': "Replace the 'if' expression on line 11 with a 'case' expression or function clauses.",
13   \     'type': 'W',
14   \     'sub_type': 'style',
15   \   },
16   \   {
17   \     'lnum': 20,
18   \     'text': 'Remove the debug call to io:format/1 on line 20.',
19   \     'type': 'W',
20   \     'sub_type': 'style',
21   \   },
22   \ ],
23   \ ale_linters#erlang#elvis#Handle(bufnr(''), [
24   \   "src/foo.erl:11:no_if_expression:Replace the 'if' expression on line 11 with a 'case' expression or function clauses.",
25   \   'src/foo.erl:20:no_debug_call:Remove the debug call to io:format/1 on line 20.',
26   \ ])
27
28 Execute(Line length message shouldn't contain the line itself):
29   AssertEqual
30   \ [
31   \   {
32   \     'lnum': 24,
33   \     'text': 'Line 24 is too long.',
34   \     'type': 'W',
35   \     'sub_type': 'style',
36   \   },
37   \ ],
38   \ ale_linters#erlang#elvis#Handle(bufnr(''), [
39   \   'src/foo.erl:24:line_length:Line 24 is too long:     io:format("Look ma, too long!"),.',
40   \ ])