diff options
author | David Dominguez <352985+ddominguez@users.noreply.github.com> | 2024-03-02 02:05:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 16:05:47 +0900 |
commit | 4d132b3ffa5c42c882fccdf970ddb3f0063ee599 (patch) | |
tree | 337795722593af5853b544e381a0ab27deb016b9 | |
parent | b01c0b23bb9f143c672dbb3a589f77dd930123e2 (diff) | |
download | ale-4d132b3ffa5c42c882fccdf970ddb3f0063ee599.zip |
Fix biome formatter (#4733)
* Fix biome formatter
Added escaped executable to the biome#Fix command
* Added fixer callback test
-rw-r--r-- | autoload/ale/fixers/biome.vim | 2 | ||||
-rw-r--r-- | test/fixers/test_biome_fixer_callback.vader | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/autoload/ale/fixers/biome.vim b/autoload/ale/fixers/biome.vim index 903d7f39..0f210657 100644 --- a/autoload/ale/fixers/biome.vim +++ b/autoload/ale/fixers/biome.vim @@ -3,7 +3,7 @@ function! ale#fixers#biome#Fix(buffer) abort let l:options = ale#Var(a:buffer, 'biome_options') return { - \ 'command': '%e format' + \ 'command': ale#Escape(l:executable) . ' format' \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' --stdin-file-path=%s', \} diff --git a/test/fixers/test_biome_fixer_callback.vader b/test/fixers/test_biome_fixer_callback.vader new file mode 100644 index 00000000..632a7ec4 --- /dev/null +++ b/test/fixers/test_biome_fixer_callback.vader @@ -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' + \ } + |