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:
BarrOff
2021-03-23 12:51:14 +00:00
committed by GitHub
parent c6b61950f8
commit cdac7a830e
8 changed files with 90 additions and 0 deletions

View 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