|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
code scanner to catch missing error logs/catch etc?
I looked in the archives but
couldn't find the recent post mentioning code scanners one can use
across a code base to find missing error logging in catch's, missing
catches and other important problems.
Thanks for mentioning what scanners worked for you. Curt Smith _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
|
|
Re: code scanner to catch missing error logs/catch etc?Take a look at FindBugs. It will show you lots of potential problems
in your code, and best of all you can write your own bug detectors - maybe even one that looks for missing logging in a catch block. Here's a link to the second half of a two part article on FindBugs on IBM's DeveloperWorks site (http://www.ibm.com/developerworks/java/library/j-findbug2/) which will show you how to write a bug detector that's related to what you're looking for Good luck - let us know how it turns out, Burk "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius) On Wed, Oct 7, 2009 at 11:58 AM, Curt Smith <csmith@...> wrote: > I looked in the archives but couldn't find the recent post mentioning code > scanners one can use across a code base to find missing error logging in > catch's, missing catches and other important problems. > > Thanks for mentioning what scanners worked for you. > > Curt Smith > > _______________________________________________ > ajug-members mailing list > ajug-members@... > http://www.ajug.org/mailman/listinfo/ajug-members > > _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
|
|
Re: code scanner to catch missing error logs/catch etc?Static Analysis Tools:
Findbugs - http://findbugs.sourceforge.net/ I have Findbugs running in my IDE and also use it in our Maven build processes. I can't praise it enough. PMD - http://pmd.sourceforge.net/ PMD is very powerful but very verbose. It can be tuned to be less verbose and has some very nice features like Cut & Paste Detection (http://pmd.sourceforge.net/cpd.html ). Style/Coding Standards: Checkstyle - http://checkstyle.sourceforge.net/ If you use a coding standard or want to Checkstyle is a great way to report on compliance. Note of caution- many IDE "format" functions don't comply with Sun Coding standards so tweaking your personal settings might be necessary. On Oct 7, 2009, at 3:10 PM, SilverAnvil wrote: > Take a look at FindBugs. It will show you lots of potential problems > in your code, and best of all you can write your own bug detectors - > maybe even one that looks for missing logging in a catch block. > > Here's a link to the second half of a two part article on FindBugs on > IBM's DeveloperWorks site > (http://www.ibm.com/developerworks/java/library/j-findbug2/) which > will show you how to write a bug detector that's related to what > you're looking for > > Good luck - let us know how it turns out, > Burk > "Any sufficiently analyzed magic is indistinguishable from science!" > Agatha Heterodyne (Girl Genius) > > > > On Wed, Oct 7, 2009 at 11:58 AM, Curt Smith <csmith@...> > wrote: >> I looked in the archives but couldn't find the recent post >> mentioning code >> scanners one can use across a code base to find missing error >> logging in >> catch's, missing catches and other important problems. >> >> Thanks for mentioning what scanners worked for you. >> >> Curt Smith >> >> _______________________________________________ >> ajug-members mailing list >> ajug-members@... >> http://www.ajug.org/mailman/listinfo/ajug-members >> >> > > _______________________________________________ > ajug-members mailing list > ajug-members@... > http://www.ajug.org/mailman/listinfo/ajug-members > _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
|
|
Re: code scanner to catch missing error logs/catch etc?
Thanks for these suggestions. I have a near term need to scan all of
our code for missing catches where there's just a try / finally,
catches with no throw or error log etc. You can imagine the scenario
I'm trying to plug.
Checkstyle doesn't seem like the right engine for my parsing need in the 20 minutes I looked it. Am I wrong or what is the better tool for my scenario/ tnx alot to all, Curt Ben Hall wrote: Static Analysis Tools: Findbugs - http://findbugs.sourceforge.net/ I have Findbugs running in my IDE and also use it in our Maven build processes. I can't praise it enough. PMD - http://pmd.sourceforge.net/ PMD is very powerful but very verbose. It can be tuned to be less verbose and has some very nice features like Cut & Paste Detection (http://pmd.sourceforge.net/cpd.html ). Style/Coding Standards: Checkstyle - http://checkstyle.sourceforge.net/ If you use a coding standard or want to Checkstyle is a great way to report on compliance. Note of caution- many IDE "format" functions don't comply with Sun Coding standards so tweaking your personal settings might be necessary. On Oct 7, 2009, at 3:10 PM, SilverAnvil wrote:Take a look at FindBugs. It will show you lots of potential problems in your code, and best of all you can write your own bug detectors - maybe even one that looks for missing logging in a catch block. Here's a link to the second half of a two part article on FindBugs on IBM's DeveloperWorks site (http://www.ibm.com/developerworks/java/library/j-findbug2/) which will show you how to write a bug detector that's related to what you're looking for Good luck - let us know how it turns out, Burk "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius) On Wed, Oct 7, 2009 at 11:58 AM, Curt Smith csmith@... wrote:I looked in the archives but couldn't find the recent post mentioning code scanners one can use across a code base to find missing error logging in catch's, missing catches and other important problems. Thanks for mentioning what scanners worked for you. Curt Smith _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members_______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members_______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
|
|
Re: code scanner to catch missing error logs/catch etc?
Report from my actual use:
FindBugs is a nice tool with GUI for running interactively. Interestingly it does byte code inspection so you need to have the code compiled. Which seems reasonable but I was given some projects without their dependancies and just have the source. No big deal, just FYI. I like the ability to sort the issues by criticality. I added the add on filters for more things being looked for. PMD is also useful but no UI. Works fine from the command line with text mode output. PMD found the issues I was looking for, vs FindBugs did not. Empty catches, empty finally. What neither of these had a filter for was try / finally but no catch. I wrote a shell script that works ok for this one prior to using these tools... BTW PMD does not have good doc showing what filters it has. You need to look in the pmd.jar for filters/* and run a combination of the provided filters to find tune what you are looking for. curt Ben Hall wrote: Static Analysis Tools: Findbugs - http://findbugs.sourceforge.net/ I have Findbugs running in my IDE and also use it in our Maven build processes. I can't praise it enough. PMD - http://pmd.sourceforge.net/ PMD is very powerful but very verbose. It can be tuned to be less verbose and has some very nice features like Cut & Paste Detection (http://pmd.sourceforge.net/cpd.html ). Style/Coding Standards: Checkstyle - http://checkstyle.sourceforge.net/ If you use a coding standard or want to Checkstyle is a great way to report on compliance. Note of caution- many IDE "format" functions don't comply with Sun Coding standards so tweaking your personal settings might be necessary. On Oct 7, 2009, at 3:10 PM, SilverAnvil wrote:Take a look at FindBugs. It will show you lots of potential problems in your code, and best of all you can write your own bug detectors - maybe even one that looks for missing logging in a catch block. Here's a link to the second half of a two part article on FindBugs on IBM's DeveloperWorks site (http://www.ibm.com/developerworks/java/library/j-findbug2/) which will show you how to write a bug detector that's related to what you're looking for Good luck - let us know how it turns out, Burk "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius) On Wed, Oct 7, 2009 at 11:58 AM, Curt Smith csmith@... wrote:I looked in the archives but couldn't find the recent post mentioning code scanners one can use across a code base to find missing error logging in catch's, missing catches and other important problems. Thanks for mentioning what scanners worked for you. Curt Smith _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members_______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members_______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
|
|
Re: code scanner to catch missing error logs/catch etc?PMD has an Eclipse integration plugin, sometimes a little unstable but
useful enough. -- Gabriel Claramunt http://gabrielsw.blogspot.com On Wed, Oct 14, 2009 at 5:29 PM, Curt Smith <csmith@...> wrote: > Report from my actual use: > > FindBugs is a nice tool with GUI for running interactively. Interestingly > it does byte code inspection so you need to have the code compiled. Which > seems reasonable but I was given some projects without their dependancies > and just have the source. No big deal, just FYI. I like the ability to > sort the issues by criticality. I added the add on filters for more things > being looked for. > > PMD is also useful but no UI. Works fine from the command line with text > mode output. PMD found the issues I was looking for, vs FindBugs did not. > Empty catches, empty finally. What neither of these had a filter for was > try / finally but no catch. I wrote a shell script that works ok for this > one prior to using these tools... BTW PMD does not have good doc showing > what filters it has. You need to look in the pmd.jar for filters/* and run > a combination of the provided filters to find tune what you are looking for. > > curt > > Ben Hall wrote: > > Static Analysis Tools: > > Findbugs - http://findbugs.sourceforge.net/ > > I have Findbugs running in my IDE and also use it in our Maven build > processes. I can't praise it enough. > > PMD - http://pmd.sourceforge.net/ > > PMD is very powerful but very verbose. It can be tuned to be less > verbose and has some very nice features like Cut & Paste Detection > (http://pmd.sourceforge.net/cpd.html > ). > > Style/Coding Standards: > > Checkstyle - http://checkstyle.sourceforge.net/ > > If you use a coding standard or want to Checkstyle is a great way to > report on compliance. Note of caution- many IDE "format" functions > don't comply with Sun Coding standards so tweaking your personal > settings might be necessary. > > > > On Oct 7, 2009, at 3:10 PM, SilverAnvil wrote: > > > > Take a look at FindBugs. It will show you lots of potential problems > in your code, and best of all you can write your own bug detectors - > maybe even one that looks for missing logging in a catch block. > > Here's a link to the second half of a two part article on FindBugs on > IBM's DeveloperWorks site > (http://www.ibm.com/developerworks/java/library/j-findbug2/) which > will show you how to write a bug detector that's related to what > you're looking for > > Good luck - let us know how it turns out, > Burk > "Any sufficiently analyzed magic is indistinguishable from science!" > Agatha Heterodyne (Girl Genius) > > > > On Wed, Oct 7, 2009 at 11:58 AM, Curt Smith <csmith@...> > wrote: > > > I looked in the archives but couldn't find the recent post > mentioning code > scanners one can use across a code base to find missing error > logging in > catch's, missing catches and other important problems. > > Thanks for mentioning what scanners worked for you. > > Curt Smith > > _______________________________________________ > ajug-members mailing list > ajug-members@... > http://www.ajug.org/mailman/listinfo/ajug-members > > > > > _______________________________________________ > ajug-members mailing list > ajug-members@... > http://www.ajug.org/mailman/listinfo/ajug-members > > > > _______________________________________________ > ajug-members mailing list > ajug-members@... > http://www.ajug.org/mailman/listinfo/ajug-members > > > _______________________________________________ > ajug-members mailing list > ajug-members@... > http://www.ajug.org/mailman/listinfo/ajug-members > > -- Gabriel Claramunt http://gabrielsw.blogspot.com _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
|
|
Re: code scanner to catch missing error logs/catch etc?For NetBeans users-
Software Quality Environment, SQE, which bundles Findbugs, Checkstyle, PMD, and Dependency Finder into a Netbeans plugin is available again for NB 6.7. JavaPosse Groups thread that lead me too it - http://groups.google.com/group/javaposse/browse_thread/thread/3938e601c662e2e3 Project Kenai Link- http://kenai.com/projects/sqe On Oct 14, 2009, at 7:45 PM, Gabriel Claramunt wrote: > PMD has an Eclipse integration plugin, sometimes a little unstable but > useful enough. > > -- > Gabriel Claramunt > http://gabrielsw.blogspot.com > > On Wed, Oct 14, 2009 at 5:29 PM, Curt Smith <csmith@...> > wrote: >> Report from my actual use: >> >> FindBugs is a nice tool with GUI for running interactively. >> Interestingly >> it does byte code inspection so you need to have the code >> compiled. Which >> seems reasonable but I was given some projects without their >> dependancies >> and just have the source. No big deal, just FYI. I like the >> ability to >> sort the issues by criticality. I added the add on filters for >> more things >> being looked for. >> >> PMD is also useful but no UI. Works fine from the command line >> with text >> mode output. PMD found the issues I was looking for, vs FindBugs >> did not. >> Empty catches, empty finally. What neither of these had a filter >> for was >> try / finally but no catch. I wrote a shell script that works ok >> for this >> one prior to using these tools... BTW PMD does not have good doc >> showing >> what filters it has. You need to look in the pmd.jar for filters/* >> and run >> a combination of the provided filters to find tune what you are >> looking for. >> >> curt >> >> Ben Hall wrote: >> >> Static Analysis Tools: >> >> Findbugs - http://findbugs.sourceforge.net/ >> >> I have Findbugs running in my IDE and also use it in our Maven build >> processes. I can't praise it enough. >> >> PMD - http://pmd.sourceforge.net/ >> >> PMD is very powerful but very verbose. It can be tuned to be less >> verbose and has some very nice features like Cut & Paste Detection >> (http://pmd.sourceforge.net/cpd.html >> ). >> >> Style/Coding Standards: >> >> Checkstyle - http://checkstyle.sourceforge.net/ >> >> If you use a coding standard or want to Checkstyle is a great way to >> report on compliance. Note of caution- many IDE "format" functions >> don't comply with Sun Coding standards so tweaking your personal >> settings might be necessary. >> >> >> >> On Oct 7, 2009, at 3:10 PM, SilverAnvil wrote: >> >> >> >> Take a look at FindBugs. It will show you lots of potential problems >> in your code, and best of all you can write your own bug detectors - >> maybe even one that looks for missing logging in a catch block. >> >> Here's a link to the second half of a two part article on FindBugs on >> IBM's DeveloperWorks site >> (http://www.ibm.com/developerworks/java/library/j-findbug2/) which >> will show you how to write a bug detector that's related to what >> you're looking for >> >> Good luck - let us know how it turns out, >> Burk >> "Any sufficiently analyzed magic is indistinguishable from science!" >> Agatha Heterodyne (Girl Genius) >> >> >> >> On Wed, Oct 7, 2009 at 11:58 AM, Curt Smith <csmith@...> >> wrote: >> >> >> I looked in the archives but couldn't find the recent post >> mentioning code >> scanners one can use across a code base to find missing error >> logging in >> catch's, missing catches and other important problems. >> >> Thanks for mentioning what scanners worked for you. >> >> Curt Smith >> >> _______________________________________________ >> ajug-members mailing list >> ajug-members@... >> http://www.ajug.org/mailman/listinfo/ajug-members >> >> >> >> >> _______________________________________________ >> ajug-members mailing list >> ajug-members@... >> http://www.ajug.org/mailman/listinfo/ajug-members >> >> >> >> _______________________________________________ >> ajug-members mailing list >> ajug-members@... >> http://www.ajug.org/mailman/listinfo/ajug-members >> >> >> _______________________________________________ >> ajug-members mailing list >> ajug-members@... >> http://www.ajug.org/mailman/listinfo/ajug-members >> >> > > > > -- > Gabriel Claramunt > http://gabrielsw.blogspot.com > > _______________________________________________ > ajug-members mailing list > ajug-members@... > http://www.ajug.org/mailman/listinfo/ajug-members > _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
|
|
Re: code scanner to catch missing error logs/catch etc?If your project is maven based I have found Sonar to be nice.
On Wed, Oct 14, 2009 at 8:11 PM, Ben Hall <bhall@...> wrote: For NetBeans users- -- Summers Pittman ~Java Developer >>Phone:912 293 2314 >>Website:www.sagaoftherealms.net _______________________________________________ ajug-members mailing list ajug-members@... http://www.ajug.org/mailman/listinfo/ajug-members |
| Free embeddable forum powered by Nabble | Forum Help |