Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!sunc.osc.edu!malgudi!caen!sdd.hp.com!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!felix!asylvain From: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Newsgroups: comp.lang.c Subject: Re: One solution to lint beef Summary: Use make and egrep to filter out lint noise Keywords: lint, make, egrep, filtering lint noise Message-ID: <152325@felix.UUCP> Date: 12 Oct 90 23:57:43 GMT References: <586@dptechno.UUCP> <1990Sep24.193012.14074@diku.dk> <12141@crdgw1.crd.ge.com> <151806@felix.UUCP> <1014@gistdev.gist.com> <1732@b15.INGR.COM> <2547@cirrusl.UUCP> Sender: daemon@felix.UUCP Reply-To: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Organization: FileNet Corp., Costa Mesa, CA Lines: 56 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 "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!= = = = = =