summaryrefslogtreecommitdiff
path: root/ale_linters/tex
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-11 19:40:57 +0000
committerw0rp <devw0rp@gmail.com>2017-02-11 19:40:57 +0000
commitecbb27680563a50d4dd981f968d659ef20bfbe30 (patch)
tree3e60f1ad7840dce1351819cd191a4c7ca0a7330e /ale_linters/tex
parentc33602534e205aa677521ce49a8054588d88bdc2 (diff)
downloadale-ecbb27680563a50d4dd981f968d659ef20bfbe30.zip
Replace every stdin-wrapper script with the new %t formatting support
Diffstat (limited to 'ale_linters/tex')
-rw-r--r--ale_linters/tex/lacheck.vim13
-rw-r--r--ale_linters/tex/proselint.vim2
2 files changed, 11 insertions, 4 deletions
diff --git a/ale_linters/tex/lacheck.vim b/ale_linters/tex/lacheck.vim
index ffa1daa7..848cbed2 100644
--- a/ale_linters/tex/lacheck.vim
+++ b/ale_linters/tex/lacheck.vim
@@ -4,6 +4,14 @@
let g:ale_tex_lacheck_executable =
\ get(g:, 'ale_tex_lacheck_executable', 'lacheck')
+function! ale_linters#tex#lacheck#GetExecutable(buffer) abort
+ return g:ale_tex_lacheck_executable
+endfunction
+
+function! ale_linters#tex#lacheck#GetCommand(buffer) abort
+ return g:ale_tex_lacheck_executable . ' %t'
+endfunction
+
function! ale_linters#tex#lacheck#Handle(buffer, lines) abort
" Mattes lines like:
"
@@ -43,8 +51,7 @@ endfunction
call ale#linter#Define('tex', {
\ 'name': 'lacheck',
-\ 'executable': 'lacheck',
-\ 'command': g:ale#util#stdin_wrapper . ' .tex '
-\ . g:ale_tex_lacheck_executable,
+\ 'executable_callback': 'ale_linters#tex#lacheck#GetExecutable',
+\ 'command_callback': 'ale_linters#tex#lacheck#GetCommand',
\ 'callback': 'ale_linters#tex#lacheck#Handle'
\})
diff --git a/ale_linters/tex/proselint.vim b/ale_linters/tex/proselint.vim
index d175c88c..6801cf3e 100644
--- a/ale_linters/tex/proselint.vim
+++ b/ale_linters/tex/proselint.vim
@@ -4,6 +4,6 @@
call ale#linter#Define('tex', {
\ 'name': 'proselint',
\ 'executable': 'proselint',
-\ 'command': g:ale#util#stdin_wrapper . ' .tex proselint',
+\ 'command': 'proselint %t',
\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
\})