if exists('g:syntastic_nitg')
let s:nitg = g:syntastic_nitg
else
- let s:nitg = "nitc"
+ let s:nitg = "nitpick"
endif
if !executable(s:nitg)
if exists('g:syntastic_nitg')
- echo "Syntastic for Nit error: Custom nitg cannot be found at: " . g:syntastic_nitg
+ echo "Syntastic for Nit error: Custom tool cannot be found at: " . g:syntastic_nitg
endif
finish
endif
endfunction
function! SyntaxCheckers_nit_nitg_GetLocList()
- let makeprg = s:nitg . " --no-color --only-metamodel "
+ let makeprg = s:nitg . " --no-color --only-metamodel -W "
" custom NIT_DIR
if exists('g:syntastic_nit_dir')
\ '%f:%l\,%c--%*[0-9]\,%*[0-9]:',
\ '%f:%l\,%c:' ]
let ef_type = [ ' %tarning: ',
+ \ ' %tocumentation warning: ',
\ '' ]
" generate errorformat from combinations
endfor
endfor
- return SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat })
+ let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'postprocess': ['guards'] })
+
+ for e in loclist
+ if e['type'] ==? 'd' " is a documentation warning
+ let e['type'] = 'w'
+ let e['subtype'] = 'Style'
+ endif
+ endfor
+
+ return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({