diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-15 18:24:53 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-15 18:28:28 +0100 |
commit | a42999a639b2916b769a85f37d037be314d9d61b (patch) | |
tree | 5ebfb4d357dc673efa93fd32a66b489c4510de40 /ale_linters/thrift | |
parent | 5155a35a80fe3b20659eb0f28cc6cc720532dd3f (diff) | |
download | ale-a42999a639b2916b769a85f37d037be314d9d61b.zip |
Massively reduce the amount of code needed for linter tests
Diffstat (limited to 'ale_linters/thrift')
-rw-r--r-- | ale_linters/thrift/thrift.vim | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ale_linters/thrift/thrift.vim b/ale_linters/thrift/thrift.vim index 741e80ab..a8fe10b6 100644 --- a/ale_linters/thrift/thrift.vim +++ b/ale_linters/thrift/thrift.vim @@ -20,14 +20,12 @@ function! ale_linters#thrift#thrift#GetCommand(buffer) abort let l:generators = ['cpp'] endif - let l:output_dir = ale#util#Tempname() - call mkdir(l:output_dir) - call ale#engine#ManageDirectory(a:buffer, l:output_dir) + let l:output_dir = ale#engine#CreateDirectory(a:buffer) return ale#Escape(ale_linters#thrift#thrift#GetExecutable(a:buffer)) - \ . ' ' . join(map(copy(l:generators), "'--gen ' . v:val")) - \ . ' ' . join(map(copy(l:includes), "'-I ' . v:val")) - \ . ' ' . ale#Var(a:buffer, 'thrift_thrift_options') + \ . ale#Pad(join(map(copy(l:generators), "'--gen ' . v:val"))) + \ . ale#Pad(join(map(copy(l:includes), "'-I ' . v:val"))) + \ . ale#Pad(ale#Var(a:buffer, 'thrift_thrift_options')) \ . ' -out ' . ale#Escape(l:output_dir) \ . ' %t' endfunction |