I am using VS code together with the C/C++ and CMake extensions to develop a C project that is built with CMake. I have added a custom target to my CMakeLists.txt
file that runs doxygen. I would like to see warnings from doxygen in the problems view of VS code. However they are not parsed, because doxygen doesn’t include the column in its output. It prints something like this:
/path/to/file.c:4: warning: Found unknown command '@xyz'
While VS code only parses something like this:
/path/to/file.c:4:2: warning: Found unknown command '@xyz'
Doxygen cannot print the column. My only option there would be to add a dummy column. Is there a way to change VS code’s behavior?
2
Answers
You wrote, correctly:
I’m not sure about what you meant with / where to do this:
but indeed in doxygen you can accomplish this by changing the
WARN_FORMAT
setting to e.g.:If you run doxygen as a task defined in tasks.json, you should be able to define your own custom problem matcher (put this in the
"problemMatcher"
field of a task in tasks.json. This is adapted from the example shown in VS Code’s help page on tasks, in the section on defining a problem matcher):Otherwise, if this is behaviour you’re getting from an extension you have installed, you should go talk to the maintainer of that extension.