mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-28 12:32:27 +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:
@@ -25,9 +25,11 @@ Execute(Should return 'gradlew' command if project includes gradle wapper):
|
||||
call ale#test#SetFilename('gradle-test-files/wrapped-project/src/main/kotlin/dummy.kt')
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#CdString(ale#path#Simplify(g:dir . '/gradle-test-files/wrapped-project'))
|
||||
\ . ale#Escape(ale#path#Simplify(g:dir . '/gradle-test-files/wrapped-project/gradlew'))
|
||||
\ [
|
||||
\ ale#path#Simplify(g:dir . '/gradle-test-files/wrapped-project'),
|
||||
\ ale#Escape(ale#path#Simplify(g:dir . '/gradle-test-files/wrapped-project/gradlew'))
|
||||
\ . g:command_tail,
|
||||
\ ],
|
||||
\ ale#gradle#BuildClasspathCommand(bufnr(''))
|
||||
|
||||
Execute(Should return 'gradle' command if project does not include gradle wapper):
|
||||
@@ -36,14 +38,15 @@ Execute(Should return 'gradle' command if project does not include gradle wapper
|
||||
\ . ale#path#Simplify(g:dir . '/gradle-test-files')
|
||||
|
||||
AssertEqual
|
||||
\ ale#path#CdString(ale#path#Simplify(g:dir . '/gradle-test-files/unwrapped-project'))
|
||||
\ . ale#Escape('gradle')
|
||||
\ . g:command_tail,
|
||||
\ [
|
||||
\ ale#path#Simplify(g:dir . '/gradle-test-files/unwrapped-project'),
|
||||
\ ale#Escape('gradle') . g:command_tail
|
||||
\ ],
|
||||
\ ale#gradle#BuildClasspathCommand(bufnr(''))
|
||||
|
||||
Execute(Should return empty string if gradle cannot be executed):
|
||||
call ale#test#SetFilename('gradle-test-files/non-gradle-project/src/main/kotlin/dummy.kt')
|
||||
|
||||
AssertEqual
|
||||
\ '',
|
||||
\ ['', ''],
|
||||
\ ale#gradle#BuildClasspathCommand(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user