Use scala compiler instead of interpreter

Using the scala compiler instead of the interpreter to check the syntax
means that an error will not be raised if there is a package
decleration.

Also, stopping the compiler after the parser stage stops errors being
raised when importing from other files in your project.
This commit is contained in:
Guy John 2013-01-03 12:24:02 +00:00
parent 10c845d1f5
commit 850046bc08

View File

@ -11,7 +11,7 @@
"============================================================================ "============================================================================
"bail if the user doesnt have the scala binary installed "bail if the user doesnt have the scala binary installed
if !executable("scala") if !executable("scalac")
finish finish
endif endif
@ -20,7 +20,7 @@ if !exists("g:syntastic_scala_options")
endif endif
function! SyntaxCheckers_scala_GetLocList() function! SyntaxCheckers_scala_GetLocList()
let makeprg = 'scala '. g:syntastic_scala_options .' '. shellescape(expand('%')) . ' /dev/null' let makeprg = 'scalac -Ystop-after:parser '. g:syntastic_scala_options .' '. shellescape(expand('%'))
let errorformat = '%f\:%l: %trror: %m' let errorformat = '%f\:%l: %trror: %m'