mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-10 14:31:52 +08:00
Close #2281 - Separate cwd commands from commands
Working directories are now set seperately from the commands so they can later be swapped out when running linters over projects is supported, and also better support filename mapping for running linters on other machines in future.
This commit is contained in:
@@ -1,23 +1,13 @@
|
||||
Before:
|
||||
Save g:ale_haskell_cabal_ghc_options
|
||||
|
||||
unlet! g:ale_haskell_cabal_ghc_options
|
||||
unlet! b:ale_haskell_cabal_ghc_options
|
||||
|
||||
runtime ale_linters/haskell/cabal_ghc.vim
|
||||
call ale#assert#SetUpLinterTest('haskell', 'cabal_ghc')
|
||||
|
||||
After:
|
||||
Restore
|
||||
unlet! b:ale_haskell_cabal_ghc_options
|
||||
call ale#linter#Reset()
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The options should be used in the command):
|
||||
AssertEqual
|
||||
\ ale#path#BufferCdString(bufnr('')) . 'cabal exec -- ghc -fno-code -v0 %t',
|
||||
\ ale_linters#haskell#cabal_ghc#GetCommand(bufnr(''))
|
||||
AssertLinterCwd '%s:h'
|
||||
AssertLinter 'cabal', 'cabal exec -- ghc -fno-code -v0 %t'
|
||||
|
||||
let b:ale_haskell_cabal_ghc_options = 'foobar'
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#BufferCdString(bufnr('')) . 'cabal exec -- ghc foobar %t',
|
||||
\ ale_linters#haskell#cabal_ghc#GetCommand(bufnr(''))
|
||||
AssertLinter 'cabal', 'cabal exec -- ghc foobar %t'
|
||||
|
||||
Reference in New Issue
Block a user