-efile2 for inhibition within a file
-efile only inhibits messages about a file. This causes requests in the forum/to support from time to time. Mostly the questioner will be explained that -efile works only for messages about the file. The answer is correct, but leaves the questioner unsatisfied, as he/she is looking for something like -efile2.
It should not be too difficult to implement it and would help many people.
The -efile option has been extended to support suppressions within a file instead of just suppressions about a file in the upcoming PC-lint Plus.
I agree that this would be a great addition.
I know I've read about this issue in the past, and haven't yet seen a solution for it.
I recently posted thread http://www.gimpel.com/Discussion.cfm?ThreadID=4690 to look for a resolution. It seems that there still is not one available.
Ralf Hain commented
-efile2 for baseline-ing
// Here is my draft for differential lint / lint baseline/ reference build / new only
// run this to "create a baseline"
lint-nt yourOptions.lnt -h1 -"format=-efunc(%n,%i)" -os(autoefunc.lnt) *.c
// Not all messages occur inside functions, so -efunc is not enough.
lint-nt yourOptions.lnt -autoefunc.lnt -h1 -"format=-efile2(%n,%f)" -os(autoefile2.lnt) *.c
// -efile2 would help here. The safety-net is not very dense, but it would still catch
// most of the new issues.
//run this regularly:
lint-nt yourOptions.lnt autoefunc.lnt autoefile2.lnt *.c
//missing in the draft:
// - uniq_without_sort: awk '!_[$0]++'
// - Back to the sixties: 960/961/1960/1963. Danger that they deactivated for every file.