[comp.lang.c] One solution to lint beef

asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) (10/13/90)

I LIKE THIS!!!  8-)

Some time ago, I posted a complaint about how useless lint is, because
it "hen-pecks" at you with more information than you need to know, to
the point where it doesn't get used to find *real* problems.

Well, Mr. Rahul Dhesi finally sent me a solution I like!  I don't have
to rewrite lint, I don't have to buy some new version of lint!  I can
take it with me to any Unix shop in the world that has lint!   8-)

I've included the entire article, *just in case* someone didn't see (or
lost) the original!  Sorry if this wastes bandwidth for the rest of you.

In article <2547@cirrusl.UUCP> dhesi%cirrusl@oliveb.ATC.olivetti.com
   (Rahul Dhesi) writes:
"In my makefile I have several lint targets that provide different
"levels of linting.  I normally do "make lint".  Less often, I use a
"different level.  Each target filters through a different egrep
"pattern.
"
"     lint0:
"             lint $(LINTFLAGS) $(SRCS)
"     
"     lint1:
"             lint $(LINTFLAGS) $(SRCS) | \
"             egrep -v "`cat .stop.$@`"
"     
"     lint2:
"             lint $(LINTFLAGS) $(SRCS) | \
"             egrep -v "`cat .stop.$@`"
"     
"     lint3:
"             lint $(LINTFLAGS) $(SRCS) | \
"             egrep -v "`cat .stop.$@`"
"
"The .stop.lint* files contain the lint output filtration patterns.
"E.g., .stop.lint3 contains (all one line;  broken with \ here for
"clarity):
"
"     enumeration type clash|possible pointer alignment|\
"     unused in function|set but not used in function|\
"     but never used|iovec never defined
"--
"Rahul Dhesi <dhesi%cirrusl@oliveb.ATC.olivetti.com>
"UUCP:  oliveb!cirrusl!dhesi

Oh yeah, there you go!  That's guaranteed to eliminate unwanted
noise from lint!

Now, if we could only do this with Mother-in-Law ... ;-)
--
=============Opinions are Mine, typos belong to /bin/ucb/vi=============
"We're sorry, but the reality you have dialed is no   |            Alvin
longer in service.  Please check the value of pi,     |   "the Chipmunk"
or pray to your local diety for assistance."          |          Sylvain
= = = = = =I haven't the smoggiest notion what my address is!= = = = = =