Format output
Would be nice if there would be a way to format the output like cppcheck allows: e.g. --template vs $(SolutionDir)
This enables developers using Visual Studio just double-clock onto the c++ warning and jump directly to the bad line.
Comments (4)
-
-
reporter Yes, the output must be formatted like this:
#! RelativePath\FileName.ext(line,column): warning : XX1234: Some text
... to be accepted by VS IDE
e.g. Text\UrlBuilder.cs(19,1): warning : SP2000: Invalid spacing at the end of the line.
-
vera++ API does not provide any way to report the column. In consequence we can't match this exact format. However there is the
--vc-report
which is quite close:../tests/L005.cpp(1): leading empty line(s) ../tests/L005.cpp(6): too many consecutive empty lines
we are using vera++ in visual studio that way (with a cmake generator) and it works well.
Is this option good enough for your case?
-
The column is not required, so it would be ok to print: RelativePath\FileName.ext(line): warning : XX1234: Some text
instead of RelativePath\FileName.ext:line: warning : XX1234: Some text
When adding Vera++ as external tool and run it inside the console this would help a lot.
- Log in to comment
Could you give more details on the expected behavior? We are not familiar with cppcheck and --template vs $(SolutionDir)