質問

I'm writing C code and was initially using the gcc checker. Errors were reported in the C file. Lots of errors that didn't matter were being reported due to, for instance, no include directory switches on the gcc command line in the checker. Because we're using icc and it feels unwieldy to setup all of the parameters that are already setup in our makefile, I decided to switch over to using the make checker.

Upon switching to the make checker, I did not get any results. Looking at the makeprg command in make.vim, it is make -sk. I realized that our makefile was not setup to do syntax checking, so I created a new target called syntax_check that added the -fsyntax-only and -c flags. I then changed the make.vim makeprg command to make -sk clean syntax-check so that the appropriate target is run.

When I save the file I watched top in another window and saw that the build is occuring. However, I'm still getting no errors. By this, I mean I don't see the green sidebar indicating lines that did not have errors. Running :Errors does not bring up the location list.

Any ideas? And is my understanding of how to look at the generated errors in syntastic wrong (which it may very well be)?

As a side note for the question here, I've also got this question in on the Syntastic github page here.

役に立ちましたか?

解決

It turns out that the errorformat was wrong for handling icc. This, of course, makes total sense.

The errorformat for icc that I've got so far is:

let errorformat = '%W%f(%l): %tarning #%n: %m,%E%f(%l): %trror: %m'

I will add more to this as I find errors that aren't covered by this format or find that I need different formatting.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top