From 47a4c8ef6fd0a874d3cf310cc51c5bfa12c2a6fa Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Mon, 24 Sep 2012 14:41:30 +0100 Subject: [PATCH] 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. --- syntax_checkers/sass.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/syntax_checkers/sass.vim b/syntax_checkers/sass.vim index f4758414..b67ed238 100644 --- a/syntax_checkers/sass.vim +++ b/syntax_checkers/sass.vim @@ -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'