mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Fix biome formatter (#4733)
* Fix biome formatter Added escaped executable to the biome#Fix command * Added fixer callback test
This commit is contained in:
@@ -3,7 +3,7 @@ function! ale#fixers#biome#Fix(buffer) abort
|
|||||||
let l:options = ale#Var(a:buffer, 'biome_options')
|
let l:options = ale#Var(a:buffer, 'biome_options')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'command': '%e format'
|
\ 'command': ale#Escape(l:executable) . ' format'
|
||||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||||
\ . ' --stdin-file-path=%s',
|
\ . ' --stdin-file-path=%s',
|
||||||
\}
|
\}
|
||||||
|
|||||||
15
test/fixers/test_biome_fixer_callback.vader
Normal file
15
test/fixers/test_biome_fixer_callback.vader
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Before:
|
||||||
|
call ale#assert#SetUpFixerTest('typescript', 'biome')
|
||||||
|
|
||||||
|
After:
|
||||||
|
call ale#assert#TearDownFixerTest()
|
||||||
|
|
||||||
|
Execute(The default biome command should be correct):
|
||||||
|
call ale#test#SetFilename('../test-files/typescript/test.ts')
|
||||||
|
|
||||||
|
AssertFixer
|
||||||
|
\ {
|
||||||
|
\ 'command': ale#Escape('biome')
|
||||||
|
\ . ' format --stdin-file-path=%s'
|
||||||
|
\ }
|
||||||
|
|
||||||
Reference in New Issue
Block a user