Lot of irrelevant warnings of TypeRegexpCheck

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Lot of irrelevant warnings of TypeRegexpCheck

shrey.tcs.sky awasthi
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Lot of irrelevant warnings of TypeRegexpCheck

Lars Kühne-3
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 <[hidden email]> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user