summaryrefslogtreecommitdiff
path: root/ale_linters/java
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-03-31 20:14:53 +0100
committerw0rp <devw0rp@gmail.com>2017-03-31 20:14:53 +0100
commit7c736579b72a79d955d090db35adf8c751a79fd8 (patch)
tree81a647646b6136bfebb6864461096f490b4af589 /ale_linters/java
parent7a8dbe1139b698cff7c7e04e5e27a40a8ffec5f5 (diff)
downloadale-7c736579b72a79d955d090db35adf8c751a79fd8.zip
Fix #438 Create Java .class files for javac in a temporary directory
Diffstat (limited to 'ale_linters/java')
-rw-r--r--ale_linters/java/javac.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/ale_linters/java/javac.vim b/ale_linters/java/javac.vim
index 9df95774..d6cb6a4b 100644
--- a/ale_linters/java/javac.vim
+++ b/ale_linters/java/javac.vim
@@ -9,8 +9,12 @@ function! ale_linters#java#javac#GetCommand(buffer) abort
\ ? '-cp ' . g:ale_java_javac_classpath
\ : ''
+ " Create .class files in a temporary directory, which we will delete later.
+ let l:class_file_directory = ale#engine#CreateDirectory(a:buffer)
+
return 'javac -Xlint '
\ . l:cp_option
+ \ . ' -d ' . fnameescape(l:class_file_directory)
\ . ' ' . g:ale_java_javac_options
\ . ' %t'
endfunction