Re: Lot of irrelevant warnings of TypeRegexpCheck
Lars Kühne <[email protected]> Wed, 21 Sep 2011 22:22:51 +0200
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <CAFUPaaGahG_XeYVcfOJQkTRTwmUoagKVaVWeL2Fz41_TkH6h6g@mail.gmail.com> |
--===============4078857283679987952== Content-Type: multipart/alternative; boundary=bcaec51d2f3028577104ad7957cd --bcaec51d2f3028577104ad7957cd Content-Type: text/plain; charset=ISO-8859-1 Hi, please check your chekstyle configuration file, search for occurences of "use a logging framework" and "SQL injection". It seems like you used the Regexp check (http://checkstyle.sourceforge.net/config_misc.html#Regexp) and forgot to set the "illegalPattern" property. Regards, Lars On Wed, Sep 21, 2011 at 6:05 PM, shrey.tcs.sky awasthi < [email protected]> wrote: > Hi, > We are getting below warnings for all the files in our repository > which are irrelevant for our code as we are using Slf4j logging framework . > Can someone please suggest on what is the Root cause for these warning and > how can they be removed . > > 1. Required pattern 'System.out is not allowed. Use a logging framework.' > missing in file. > > 2. Required pattern 'printStacktrace() is not allowed. Use a logging > framework.' missing in file. > > 3. Required pattern 'java.sql.Statement should be avoided as it allows SQL > injection. Use Preparedstatements.' missing in file. > > 4. Required pattern 'System.err is not allowed. Use a logging framework.' > missing in file. > > Regards, > Shrey > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > > --bcaec51d2f3028577104ad7957cd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,<br><br>please check your chekstyle configuration file, search for occur= ences of "use a logging framework" and "SQL injection".= It seems like you used the Regexp check (<a href=3D"http://checkstyle.sour= ceforge.net/config_misc.html#Regexp">http://checkstyle.sourceforge.net/conf= ig_misc.html#Regexp</a>) and forgot to set the "illegalPattern" p= roperty.<br> <br>Regards,<br>Lars<br><br><div class=3D"gmail_quote">On Wed, Sep 21, 2011= at 6:05 PM, shrey.tcs.sky awasthi <span dir=3D"ltr"><<a href=3D"mailto:= [email protected]">[email protected]</a>></span> wrote= :<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex;">Hi,<br>=A0=A0=A0=A0 We are getting below wa= rnings for all the files in our repository which are irrelevant for our cod= e as we are using Slf4j logging framework .<br> Can someone please suggest on what is the Root cause for these warning and = how can they be removed .<br> <br> <p class=3D"MsoNormal"><code><span style=3D"font-size:10.0pt">1. Required pattern 'System.out is not allowed. Use a logging framework.&#= 39; missing in file.</span></code><span style=3D"font-size:9.0pt"> </span></p> <p class=3D"MsoNormal"><span style=3D"font-size:9.0pt">2. </span><code><span style=3D"font-size:10.0pt">Required pattern 'printStacktrace() is not allowed. Use a logging framework.'= ; missing in file.</span></code><span style=3D"font-size:9.0pt"> </span></p> <p class=3D"MsoNormal"><code><span style=3D"font-size:10.0pt">3. Required pattern 'java.sql.Statement should be avoided as it allows SQL injection. Use Preparedstatements.' missing in file.</span></code></p> <p class=3D"MsoNormal"><code><span style=3D"font-size:10.0pt">4. Required pattern 'System.err is not allowed. Use a logging framework.&#= 39; missing in file.</span></code></p> <br>Regards,<br><font color=3D"#888888">Shrey<br><br> </font><br>----------------------------------------------------------------= --------------<br> All the data continuously generated in your IT infrastructure contains a<br= > definitive record of customers, application performance, security<br> threats, fraudulent activity and more. Splunk takes this data and makes<br> sense of it. Business sense. IT sense. Common sense.<br> <a href=3D"http://p.sf.net/sfu/splunk-d2dcopy1" target=3D"_blank">http://p.= sf.net/sfu/splunk-d2dcopy1</a><br>_________________________________________= ______<br> Checkstyle-user mailing list<br> <a href=3D"mailto:[email protected]">Checkstyle-user@li= sts.sourceforge.net</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/checkstyle-user" ta= rget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/checkstyle-use= r</a><br> <br></blockquote></div><br> --bcaec51d2f3028577104ad7957cd-- --===============4078857283679987952== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 --===============4078857283679987952== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user --===============4078857283679987952==--