Quantcast

findbugs and test code

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

findbugs and test code

Alexander Lorenz-2
hello


i activated some of the new findbugs rules for junit, but none of the
violations are triggered.
either we are that good, or fb does not analyze the test code. ;)

do i have to do anything else to make the findbugs plugin browse the
test classes too?



thanks

alex

--
Alexander Lorenz | Test Engineer Traffic | TomTom Content Production Unit Berlin | [hidden email] | +49-30-756543-194 | www.tomtom.com



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: findbugs and test code

Freddy Mallet
Hi Alex, 

In fact since Sonar 3.1 (http://jira.codehaus.org/browse/SONAR-1076), everything is in place to be able to report and display a violation on a unit test source file. But it's still the responsibility of each rule engine to decide which rule must be applied to a unit test source file or not. In Sonar 3.1, this effort has been done only on the PMD rule engine so feel free to create a ticket to update the FB-Contrib plugin. 

Kind regards,
Freddy

-----
Sonar for Continuous Inspection



On Thu, Jun 21, 2012 at 6:58 PM, Alexander Lorenz <[hidden email]> wrote:
hello


i activated some of the new findbugs rules for junit, but none of the violations are triggered.
either we are that good, or fb does not analyze the test code. ;)

do i have to do anything else to make the findbugs plugin browse the test classes too?



thanks

alex

--
Alexander Lorenz | Test Engineer Traffic | TomTom Content Production Unit Berlin | [hidden email] | <a href="tel:%2B49-30-756543-194" value="+4930756543194" target="_blank">+49-30-756543-194 | www.tomtom.com



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: findbugs and test code

Alexander Lorenz-2
hi freddy,


done!


so does that mean, if i activate pmd unit test rules and do nothing
else, and my project does not show new violations, the test code is
clean according to pmd rules?


thanks

aelx


On 06/24/2012 11:22 AM, Freddy Mallet wrote:

> Hi Alex,
>
> In fact since Sonar 3.1 (http://jira.codehaus.org/browse/SONAR-1076),
> everything is in place to be able to report and display a violation on
> a unit test source file. But it's still the responsibility of each
> rule engine to decide which rule must be applied to a unit test source
> file or not. In Sonar 3.1, this effort has been done only on the PMD
> rule engine so feel free to create a ticket to update the FB-Contrib
> plugin.
>
> Kind regards,
> Freddy


--
Alexander Lorenz | Test Engineer Traffic | TomTom Content Production Unit Berlin | [hidden email] | +49-30-756543-194 | www.tomtom.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: findbugs and test code

David Racodon-2
Hi Alexander,

so does that mean, if i activate pmd unit test rules and do nothing else, and my project does not show new violations, the test code is clean according to pmd rules?

=> I do confirm. Note that your test source code will be only checked against PMD Unit Tests rules and not against PMD rules. But if you get no violation, to make sure that your project was previously well configured, I recommend you to try to add one (there are many rules easy to break) and check if Sonar logs a violation.

Regards,


David RACODON | SonarSource
Senior Consultant



On 25 June 2012 10:56, Alexander Lorenz <[hidden email]> wrote:
hi freddy,


done!


so does that mean, if i activate pmd unit test rules and do nothing else, and my project does not show new violations, the test code is clean according to pmd rules?


thanks

aelx


On 06/24/2012 11:22 AM, Freddy Mallet wrote:
Hi Alex,

In fact since Sonar 3.1 (http://jira.codehaus.org/browse/SONAR-1076), everything is in place to be able to report and display a violation on a unit test source file. But it's still the responsibility of each rule engine to decide which rule must be applied to a unit test source file or not. In Sonar 3.1, this effort has been done only on the PMD rule engine so feel free to create a ticket to update the FB-Contrib plugin.

Kind regards,
Freddy


--
Alexander Lorenz | Test Engineer Traffic | TomTom Content Production Unit Berlin | [hidden email] | <a href="tel:%2B49-30-756543-194" value="+4930756543194" target="_blank">+49-30-756543-194 | www.tomtom.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Loading...