Let checkstyle only lint original files

Temporary files break checks like the one for a missing
package-info.java, as discussed in #1305.
This commit is contained in:
Johannes Wienke 2018-11-07 13:26:54 +01:00
parent 5d6b4ef73f
commit 8e24a1a916
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,7 @@ endfunction
function! ale_linters#java#checkstyle#GetCommand(buffer) abort
return 'checkstyle '
\ . ale#Var(a:buffer, 'java_checkstyle_options')
\ . ' %t'
\ . ' %s'
endfunction
if !exists('g:ale_java_checkstyle_options')
@ -46,4 +46,5 @@ call ale#linter#Define('java', {
\ 'executable': 'checkstyle',
\ 'command_callback': 'ale_linters#java#checkstyle#GetCommand',
\ 'callback': 'ale_linters#java#checkstyle#Handle',
\ 'lint_file': 1,
\})