summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBraden Kelley <redbmk@gmail.com>2024-06-20 16:19:55 -0700
committerGitHub <noreply@github.com>2024-06-21 08:19:55 +0900
commit0cd64c87bf72f9237eedb9bdc9739411be9120cb (patch)
treebb498effac76da44f24a870ee2a23a9a36724878
parentc7c41e157478fc9d4f65e9f640bfce75fa211fd7 (diff)
downloadale-0cd64c87bf72f9237eedb9bdc9739411be9120cb.zip
fix(biome): use temp file instead of stdin (#4775)
biome handles utf8 characters differently between files and stdin, and in some cases can replace emojis with ascii characters when using stdin refs: biomejs/biome#2604
-rw-r--r--autoload/ale/fixers/biome.vim3
-rw-r--r--test/fixers/test_biome_fixer_callback.vader3
2 files changed, 4 insertions, 2 deletions
diff --git a/autoload/ale/fixers/biome.vim b/autoload/ale/fixers/biome.vim
index 0f210657..c16cb3b8 100644
--- a/autoload/ale/fixers/biome.vim
+++ b/autoload/ale/fixers/biome.vim
@@ -3,8 +3,9 @@ function! ale#fixers#biome#Fix(buffer) abort
let l:options = ale#Var(a:buffer, 'biome_options')
return {
+ \ 'read_temporary_file': 1,
\ 'command': ale#Escape(l:executable) . ' format'
\ . (!empty(l:options) ? ' ' . l:options : '')
- \ . ' --stdin-file-path=%s',
+ \ . ' %t'
\}
endfunction
diff --git a/test/fixers/test_biome_fixer_callback.vader b/test/fixers/test_biome_fixer_callback.vader
index 632a7ec4..4c417394 100644
--- a/test/fixers/test_biome_fixer_callback.vader
+++ b/test/fixers/test_biome_fixer_callback.vader
@@ -9,7 +9,8 @@ Execute(The default biome command should be correct):
AssertFixer
\ {
+ \ 'read_temporary_file': 1,
\ 'command': ale#Escape('biome')
- \ . ' format --stdin-file-path=%s'
+ \ . ' format %t'
\ }