[splint-discuss] Splint and Vim Errorformat

Michael Wojcik Michael.Wojcik at MicroFocus.com
Thu Apr 12 10:06:55 PDT 2007


> 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




More information about the splint-discuss mailing list