]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/linter/test_checkmake.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:

Do not set EDITOR/VISUAL for shell
[etc/vim.git] / .vim / bundle / ale / test / linter / test_checkmake.vader
1 Before:
2   Save g:ale_make_checkmake_config
3
4   let g:ale_make_checkmake_config = ''
5
6   call ale#assert#SetUpLinterTest('make', 'checkmake')
7
8   " NOTE: the format string must be manually matched that set in the plugin
9   let b:format = '"{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"'
10
11 After:
12   Restore
13
14   unlet! b:command_tail
15   unlet! b:ale_make_checkmake_config
16
17   call ale#assert#TearDownLinterTest()
18
19 Execute(checkmake should run with default format option):
20   let b:command_tail = ' --format=' . b:format . ' %s'
21
22   AssertLinter 'checkmake', 'checkmake' . b:command_tail
23
24 Execute(checkmake command should take the config option if it is non-empty):
25   let g:ale_make_checkmake_config = '/path to/checkmake.ini'
26   let b:command_tail = ' --format=' . b:format
27   \ . ' --config="' . g:ale_make_checkmake_config . '"'
28   \ . ' %s'
29
30   AssertLinter 'checkmake', 'checkmake' . b:command_tail
31
32 Execute(the local buffer config option takes precedence over global option):
33   let g:ale_make_checkmake_config = '/path/to/checkmake.ini'
34   let b:ale_make_checkmake_config = '/another/checkmake.ini'
35   let b:command_tail = ' --format=' . b:format
36   \ . ' --config="' . b:ale_make_checkmake_config . '"'
37   \ . ' %s'
38
39   AssertLinter 'checkmake', 'checkmake' . b:command_tail