|
RE: Adding <Local name="foobar"> to filters (was Re: FindDeadLocalStores /: msg#00063java.findbugs.general
Bill, Looks good. I've just modified my filter accordingly (replacing fields with local) and the output is correctly filtered. In case there is any interest, here is the filter i'm using for analysing JSPs: <FindBugsFilter> <Match classregex="org\.apache\.jsp\..*"> <BugCode name="Se,SnVI,MTIA,SMII,UwF" /> </Match> <Match> <Or> <Local name="~_jspx_.*" /> <Local name="request" /> <Local name="response" /> <Local name="application" /> <Local name="config" /> <Local name="session" /> <Local name="out" /> <Local name="page" /> <Local name="pageContext" /> </Or> </Match> </FindBugsFilter> Cheers, Etienne > -----Original Message----- > From: Bill Pugh [mailto:pugh@xxxxxxxxxx] > Sent: mardi 26 décembre 2006 07:08 > To: Etienne Giraudy > Cc: findbugs-discuss@xxxxxxxxxx > Subject: Adding <Local name="foobar"> to filters (was Re: > [FB-Discuss] FindDeadLocalStores / exclude filter issue) > > > > First, all the XML elements need to be wrapped in a > <FindBugsFilter> ... </FindBugsFilter> > > I'm guessing that these warnings involve local variables, not > fields. > Thus suppressing warnings > associated with particular fields won't do anything for you. > > Turns out that it seems we don't have a way to specify a local > variable name in > our suppression file format. So I added one <Local > name="whateveryouwant">. > > I really never use the suppression filters, so I'd like > people who do > use suppression > to check both my choice for the name and any other issues associated > with adding this feature. > > With this changes, the following will suppress any warnings > that have > a primary local variable > name that starts with _jspx_. > > > <FindBugsFilter> > <Match> > <Local name="~_jspx_.*" /> > </Match> > </FindBugsFilter> > > > I also changed the DLS detector so that DLS warnings on variables > with names that start > with $ or _ receive at most a low priority. > > Bill > > > On Dec 22, 2006, at 6:29 AM, Etienne Giraudy wrote: > > > <Match> > > <Or> > > <Field name="~_jspx_.*" /> > > <Field name="request" /> > > <Field name="response" /> > > <Field name="application" /> > > <Field name="config" /> > > <Field name="session" /> > > <Field name="out" /> > > <Field name="page" /> > > <Field name="pageContext" /> > > </Or> > > </Match> > >
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Having trouble validating output of using fancy.xsl, Etienne Giraudy |
|---|---|
| Next by Date: | RE: Having trouble validating output of using fancy.xsl, Etienne Giraudy |
| Previous by Thread: | Adding <Local name="foobar"> to filters (was Re: FindDeadLocalStores / exclude filter issue), Bill Pugh |
| Next by Thread: | Announcing FindBugs 1.1.2, Bill Pugh |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |