PC Lint for incremental build - with error from latest code

514 views Asked by At


I am having a CI setup with incremental build. As part of the static checking, I am planning to configure a incremental PC Lint report - This report ignoring all other previous Lint report should provide the errors induced in the new code only. Is there any tool which would do this?

Any hint on the relative area to explore would help us.


I tried report diff'ing. But since the line number would vary from last check-in, would not get the actual incremental error introduced.

I am using Linux for my project build, and using Windows for PC Lint report generation.

Regards,

2

There are 2 answers

0
Kevin Beck On

You could write a script that takes the warnings from lint, removes the line numbers and adds a few lines from the source code around where the warning occurs. Diffing this would show all new lint warnings. One flaw in this, is that it would also show any warnings where source was modified near an existing warning without fixing the warning. On the other hand, this might actually be useful.

Years ago, I saw a utility on BDS Unix that would take your compiler errors and stuff them into your source code as comments. Which might be useful for this exercise. Unfortunately I can't remember what it was called.

1
Enno On

Wouldn't it be easier to just fix all the reported errors, and have a strict policy against creating new ones? That way you don't need to worry about diffs which by the nature of the problem is going to be hard to impossible.