mirror of
https://github.com/dense-analysis/ale.git
synced 2026-03-07 07:32:01 +08:00
Add support for ptop fixer (#3652)
* Add support for `ptop` fixer * add test file for ptop tests * called wrong fixer in assertion test * use ' %s %t' instead of ' %t %t'
This commit is contained in:
17
autoload/ale/fixers/ptop.vim
Normal file
17
autoload/ale/fixers/ptop.vim
Normal file
@@ -0,0 +1,17 @@
|
||||
" Author: BarrOff https://github.com/BarrOff
|
||||
" Description: Integration of ptop with ALE.
|
||||
|
||||
call ale#Set('pascal_ptop_executable', 'ptop')
|
||||
call ale#Set('pascal_ptop_options', '')
|
||||
|
||||
function! ale#fixers#ptop#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'pascal_ptop_executable')
|
||||
let l:options = ale#Var(a:buffer, 'pascal_ptop_options')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . (empty(l:options) ? '' : ' ' . l:options)
|
||||
\ . ' %s %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
||||
Reference in New Issue
Block a user