[splint-discuss] Splint and Vim Errorformat

Keith Prickett keithp at marvell.com
Thu Apr 12 14:23:49 PDT 2007


:set errorformat=%A%f(%l\\,%c):\ %m,%+C\ %.%# Seems to work pretty well,
except files with windows paths are not recognized using %f.  For
example "foobar.c(line,column)" IS recognized and the error is shown
using :cn and :cp.  But the line containing
"C:\foo\bar\foobar.c(line,colum)" is NOT recognized.

Has anyone had any experience in this area?


Thanks,

--
Keith Prickett


-----Original Message-----
From: splint-discuss-bounces at cs.virginia.edu
[mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Michael
Wojcik
Sent: Thursday, April 12, 2007 10:07 AM
To: Discussions about the Splint annotation-assisted static
analysisproject
Subject: RE: [splint-discuss] Splint and Vim Errorformat

> From: splint-discuss-bounces at cs.virginia.edu
> [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Ludolf 
> Holzheid
> Sent: Wednesday, 11 April, 2007 18:42
> 
> On Wed, 2007-04-11 15:06:39 -0700, Keith Prickett wrote:
> > I am using Splint 3.1.1 and attempting to integrate it with gVIM on
my
> > Windows box.  I have tried multiple errorformats but can't seem to
find
> > one that parses the Splint output properly.  Has anyone had any 
> > experience with this that can lend some insight?
> 
> I don't know anything about vi. However, I expect vi to be able to 
> parse GNU-C-style error messages properly (see the 
> "-paren-file-format" flag to splint).

-paren-file-format does indeed appear to produce error messages that vim
understands out of the box.  (Plain vi doesn't have Quickfix mode; this
is a vim extension.)

I'm no expert on setting vim errorformats (I've never looked into it
before now, actually), but the following seems to work, more or less,
for Splint without -paren-file-format:

	:set errorformat=%A%f(%l\\,%c):\ %m,%+C\ %.%#

That sets a multiline error format that begins with the line containing
the filename followed by line and column number in parentheses, and
continues with lines that begin with a space.

--
Michael Wojcik
Principal Software Systems Developer, Micro Focus


_______________________________________________
splint-discuss mailing list
splint-discuss at ares.cs.Virginia.EDU
http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/splint-discuss



More information about the splint-discuss mailing list