diff --git a/syntax_checkers/scala/fsc.vim b/syntax_checkers/scala/fsc.vim index 02834aa5..d0e95a7d 100644 --- a/syntax_checkers/scala/fsc.vim +++ b/syntax_checkers/scala/fsc.vim @@ -27,12 +27,14 @@ function! SyntaxCheckers_scala_fsc_GetLocList() " fsc has some serious problems with the " working directory changing after being started " that's why we better pass an absolute path - let file = syntastic#util#shexpand('%:p') + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'fsc', + \ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options, + \ 'fname': syntastic#util#shexpand('%:p'), + \ 'filetype': 'scala', + \ 'subchecker': 'fsc' }) - let args = '-Ystop-after:parser ' . g:syntastic_scala_options - let makeprg = 'fsc ' . args . ' ' . file - - let errorformat = '%f\:%l: %trror: %m' + let errorformat = '%f:%l: %trror: %m' return SyntasticMake({ \ 'makeprg': makeprg, diff --git a/syntax_checkers/scala/scalac.vim b/syntax_checkers/scala/scalac.vim index 9bd288ec..d6319c16 100644 --- a/syntax_checkers/scala/scalac.vim +++ b/syntax_checkers/scala/scalac.vim @@ -19,19 +19,19 @@ function! SyntaxCheckers_scala_scalac_IsAvailable() return executable("scalac") endfunction -if !exists("g:syntastic_scala_options") - let g:syntastic_scala_options = " " +if !exists('g:syntastic_scala_options') + let g:syntastic_scala_options = '' endif function! SyntaxCheckers_scala_scalac_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': 'scalac', - \ 'args': '-Ystop-after:parser '. g:syntastic_scala_options, + \ 'args': '-Ystop-after:parser ' . g:syntastic_scala_options, \ 'filetype': 'scala', \ 'subchecker': 'scalac' }) - let errorformat = '%f\:%l: %trror: %m' + let errorformat = '%f:%l: %trror: %m' return SyntasticMake({ \ 'makeprg': makeprg,