Running PC-Lint from Eclipse (with Parsing)
Step 1. Install RegExp Plugin
See http://www.isystem.com/products/embedded-development-tools/eclipse-ide/regular-expression-error-parser-for-cdt.html for details.
Step 2: Setup RegExp Plugin
Make a backup copy of the configuration file errParserExpressions.properties file. For me this was located at
C:\Program Files\eclipse\plugins\si.isystem.regExErrorParser_1.0.8.i9_9_72_20090403_134038\regex
Then open the errParserExpressions.properties file and replace the contents with:
logLevel = 0
info = 1, 2, 3:LINT Info: (.*?):([0-9]+) (.*)\n \
0, 0, 1:LINT Info (.*)\n
warning = 1, 2, 3:LINT Warning: (.*?):([0-9]+) (.*)\n \
0, 0, 1:LINT Warning (.*)\n
error = 1, 2, 3:LINT Error: (.*?):([0-9]+) (.*)\n \
0, 0, 1:LINT Error (.*)\n
Step 4: Restart Eclipse
Required to pick up changes in RegExp.
Step 3: Setup Lint Project File
Add the following to your lint project file:
//For Eclipse, we change output format of messages
-"format=LINT %t%(: %f:%l %) %n %m"
-width(0,0)
Step 4: Setup Build
Configure eclipse to run lint as a build step, this will pass the output to the error parser. See the following four images:
You will need the project configured as a Makefile project. You could try running as an external tool, but then the output doesn’t seem to get passed to the error parser. Make a new target, and setup your call to pc-lint as the ‘Make’ command: {IMG(attId=“84”)}{IMG}
Then change the ‘build’ command to null (remove ‘all’) and uncheck the boxes you don’t need: {IMG(attId=“85”)}{IMG}
Ensure the output is only parsed by the RegExp: {IMG(attId=“86”)}{IMG}
Finally set your new target as active (Project->Build Configurations->Set Active->Lint) and run build. You should see the outputs valid like this: {IMG(attId=“87”)}{IMG}