문제

What kind of regex spells I need to put to Eclipse 'Regex error parser' to get PC Lint prints to "problems" view (in Eclipse C/C++ Kepler).

Current lint format is -"format=LINT %t%(: %f:%l %) %n %m" which prints:
LINT Info: Y:\path\to\file.c:91 732 Loss of sign (assignment) (int to unsigned long)

What I need is first identify that is it info, warning or error and then get:
1. File: 'Y:\path\to\file.c'
2: line: '91'
3: description: '732 Loss of sign ...'

I found one example which did not work for me (most likely the format is different) and I've tried to create my own regex command unsuccessfully.
It is also possible to change the PC-Lint format if it helps.

도움이 되었습니까?

해결책

We are using the following format option:

+ffn
-"format=\q%f\q,%l  %t[%n]: \t%m\n"

And our Eclipse regex is:

"(.*\\.*\\.*(h|cpp))",([0-9]*).*((Note|Warning|Error|Info)\[[0-9].*\]): *(.*)

File is $1 Line is $3 and as Description we used Lint $4 $6

Which turns into something like:

Lint Warning[534] Ignoring return value of function...

In the problems overview of Eclipse.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top