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

View File

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