mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-22 20:11:26 +08:00
Merge pull request #2558 from hsanson/fix-javalsp-command-callback
Fix javalsp command callback.
This commit is contained in:
@@ -6,9 +6,26 @@ After:
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(The javalsp callback should return the correct default value):
|
||||
AssertLinter 'java', ale#Escape('java') . ' -Xverify:none -m javacs/org.javacs.Main'
|
||||
AssertLinter '', ale#Escape('')
|
||||
|
||||
Execute(The javalsp java executable should be configurable):
|
||||
let b:ale_java_javalsp_executable = '/bin/foobar'
|
||||
|
||||
AssertLinter '/bin/foobar', ale#Escape('/bin/foobar') . ' -Xverify:none -m javacs/org.javacs.Main'
|
||||
AssertLinter '/bin/foobar', ale#Escape('/bin/foobar')
|
||||
|
||||
Execute(The javalsp callback should return backward compatible value):
|
||||
let b:ale_java_javalsp_executable = '/bin/java'
|
||||
let cmd = [
|
||||
\ ale#Escape('/bin/java'),
|
||||
\ '--add-exports jdk.compiler/com.sun.tools.javac.api=javacs',
|
||||
\ '--add-exports jdk.compiler/com.sun.tools.javac.code=javacs',
|
||||
\ '--add-exports jdk.compiler/com.sun.tools.javac.comp=javacs',
|
||||
\ '--add-exports jdk.compiler/com.sun.tools.javac.main=javacs',
|
||||
\ '--add-exports jdk.compiler/com.sun.tools.javac.tree=javacs',
|
||||
\ '--add-exports jdk.compiler/com.sun.tools.javac.model=javacs',
|
||||
\ '--add-exports jdk.compiler/com.sun.tools.javac.util=javacs',
|
||||
\ '--add-opens jdk.compiler/com.sun.tools.javac.api=javacs',
|
||||
\ '-m javacs/org.javacs.Main',
|
||||
\]
|
||||
AssertLinter '/bin/java', join(cmd, ' ')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user