fix: stylua should have cwd and --stdin-filepath (#4873)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-06-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

This commit is contained in:
dcai
2025-01-10 15:35:30 +11:00
committed by GitHub
parent 83ec182bdf
commit 6c337ad19c
2 changed files with 15 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The default command should be correct):
AssertFixer {'command': ale#Escape('stylua') . ' -'}
AssertFixer {'cwd': '%s:h', 'command': ale#Escape('stylua') . ' --stdin-filepath %s -'}
Execute(The stylua callback should include custom stylua options):
let g:ale_lua_stylua_executable = 'xxxinvalid'
@@ -13,7 +13,8 @@ Execute(The stylua callback should include custom stylua options):
AssertFixer
\ {
\ 'cwd': '%s:h',
\ 'command': ale#Escape('xxxinvalid')
\ . ' ' . g:ale_lua_stylua_options
\ . ' -',
\ . ' --stdin-filepath %s -',
\ }