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.
2 call ale#assert#SetUpLinterTest('lua', 'luacheck')
3 " Default to testing linting Lua not in Vim directories.
4 call ale#test#SetFilename('/test.lua')
7 " Clear the variable for saving the result of the runtime check.
8 " We don't want to cache the result between tests.
9 unlet! b:ale_in_runtimepath
10 call ale#assert#TearDownLinterTest()
12 Execute(The luacheck default command should be correct):
13 AssertLinter 'luacheck',
14 \ ale#Escape('luacheck') . ' --formatter plain --codes --filename %s -'
16 Execute(You should be able to set luacheck options):
17 let g:ale_lua_luacheck_options = '--config filename'
19 AssertLinter 'luacheck',
20 \ ale#Escape('luacheck')
21 \ . ' --config filename'
22 \ . ' --formatter plain --codes --filename %s -'
24 Execute(The luacheck executable should be configurable):
25 let g:ale_lua_luacheck_executable = 'luacheck.sh'
27 AssertLinter 'luacheck.sh',
28 \ ale#Escape('luacheck.sh') . ' --formatter plain --codes --filename %s -'
30 Execute(The luacheck command should include vim as a global if in runtimepath):
31 call ale#test#SetFilename('test.lua')
32 AssertLinter 'luacheck',
33 \ ale#Escape('luacheck') . ' --globals vim --formatter plain --codes --filename %s -'
35 Execute(The default Vim globals should not be set if globals are already set):
36 call ale#test#SetFilename('test.lua')
37 let g:ale_lua_luacheck_options = '--globals foo'
38 AssertLinter 'luacheck',
39 \ ale#Escape('luacheck') . ' --globals foo --formatter plain --codes --filename %s -'