mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-19 09:32:56 +08:00
(feat) add support for kulala_fmt fixer (#4925)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* (feat) add support for kulala_fmt fixer Co-authored-by: w0rp <w0rp@users.noreply.github.com>
This commit is contained in:
23
test/fixers/test_kulala_fmt_fixer_callback.vader
Normal file
23
test/fixers/test_kulala_fmt_fixer_callback.vader
Normal file
@@ -0,0 +1,23 @@
|
||||
Before:
|
||||
Save g:ale_http_kulala_fmt_executable
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_http_kulala_fmt_executable = 'xxxinvalid'
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The kualala_fmt callback should return the correct default values):
|
||||
call ale#test#SetFilename('../test-files/http/dummy.http')
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape(g:ale_http_kulala_fmt_executable)
|
||||
\ . ' format %t > /dev/null',
|
||||
\ 'read_temporary_file': 1,
|
||||
\ },
|
||||
\ ale#fixers#kulala_fmt#Fix(bufnr(''))
|
||||
Reference in New Issue
Block a user