diff options
author | Ryan <RyanSquared@users.noreply.github.com> | 2017-07-01 18:20:59 -0500 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-07-02 00:20:59 +0100 |
commit | 23308377477a298b60515083c96f8c6cc44172ac (patch) | |
tree | aa531422c777617f5f31a27a2d1a4db38dc02a4c /test/handler/test_lua_handler.vader | |
parent | b2e730fb5e7633453a0d61849100bf609853f70e (diff) | |
download | ale-23308377477a298b60515083c96f8c6cc44172ac.zip |
Adjust output of `luacheck` linter to include error code (#717)
* linters/lua/luacheck: Show error code in message
Diffstat (limited to 'test/handler/test_lua_handler.vader')
-rw-r--r-- | test/handler/test_lua_handler.vader | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/handler/test_lua_handler.vader b/test/handler/test_lua_handler.vader new file mode 100644 index 00000000..af1c134e --- /dev/null +++ b/test/handler/test_lua_handler.vader @@ -0,0 +1,32 @@ +After: + call ale#linter#Reset() + +Execute(The luacheck handler should parse lines correctly): + runtime ale_linters/lua/luacheck.vim + + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 8, + \ 'text': 'W612: line contains trailing whitespace', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 5, + \ 'text': 'W213: unused loop variable ''k''', + \ 'type': 'W', + \ }, + \ { + \ 'lnum': 3, + \ 'col': 19, + \ 'text': 'W113: accessing undefined variable ''x''', + \ 'type': 'W', + \ }, + \ ], + \ ale_linters#lua#luacheck#Handle(347, [ + \ ' /file/path/here.lua:1:8: (W612) line contains trailing whitespace', + \ ' /file/path/here.lua:3:5: (W213) unused loop variable ''k''', + \ ' /file/path/here.lua:3:19: (W113) accessing undefined variable ''x''', + \ ]) |