By default do not check sass partials.
Sass partials depend on their parents files for context. This patch disables the syntax checking for partials by default because of this. To enable checking of partials let g:syntastic_sass_check_partials = 1. Fixes issue #300.
This commit is contained in:
parent
9331280b73
commit
47a4c8ef6f
@ -19,6 +19,11 @@ if !executable("sass")
|
||||
finish
|
||||
endif
|
||||
|
||||
"By default do not check partials as unknown variables are a syntax error
|
||||
if !exists("g:syntastic_sass_check_partials")
|
||||
let g:syntastic_sass_check_partials = 0
|
||||
endif
|
||||
|
||||
"use compass imports if available
|
||||
let s:imports = ""
|
||||
if executable("compass")
|
||||
@ -26,6 +31,9 @@ if executable("compass")
|
||||
endif
|
||||
|
||||
function! SyntaxCheckers_sass_GetLocList()
|
||||
if !g:syntastic_sass_check_partials && expand('%:t')[0] == '_'
|
||||
return []
|
||||
end
|
||||
let makeprg='sass --no-cache '.s:imports.' --check '.shellescape(expand('%'))
|
||||
let errorformat = '%ESyntax %trror:%m,%C on line %l of %f,%Z%.%#'
|
||||
let errorformat .= ',%Wwarning on line %l:,%Z%m,Syntax %trror on line %l: %m'
|
||||
|
Loading…
Reference in New Issue
Block a user