vim/syntastic: show "Documentation warning" as a style warning
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 30 Nov 2014 16:13:28 +0000 (11:13 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sun, 30 Nov 2014 16:33:07 +0000 (11:33 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

misc/vim/syntax_checkers/nit/nitg.vim

index 22494b7..b74e269 100644 (file)
@@ -72,6 +72,7 @@ function! SyntaxCheckers_nit_nitg_GetLocList()
                                   \ '%f:%l\,%c--%*[0-9]\,%*[0-9]:',
                                   \ '%f:%l\,%c:' ]
        let ef_type = [ ' %tarning: ',
+                                 \ ' %tocumentation warning: ',
                                  \ '' ]
 
        " generate errorformat from combinations
@@ -82,7 +83,16 @@ function! SyntaxCheckers_nit_nitg_GetLocList()
                endfor
        endfor
 
-       return SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat })
+       let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat })
+
+       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({