Browse files

Merge pull request #364 from rbrown/sass_partial

By default do not check sass partials.
  • Loading branch information...
2 parents 8cb3099 + 47a4c8e commit 0b5127886f323403234b176d2b486538eeb28897 @scrooloose committed Sep 25, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 syntax_checkers/sass.vim
View
8 syntax_checkers/sass.vim
@@ -19,13 +19,21 @@ 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")
let s:imports = "--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'

0 comments on commit 0b51278

Please sign in to comment.