Ok Dave, I better understand your use case.
Unhappily, there is currently no way to configure Sonar in order to apply a set of rules on a given part of the source code and another set of rules on another part.
There are only two features :
- Excluding totally some sources from quality analysis
- Annotating the source code (comment or java annotations for findbugs) to deactivate a rule on a given line of code
But in your case, you can eventually use the sonar "branch" parameter to execute and report two different quality analysis on the same project :
- One on your new code : excluding your former code and using an extended quality profile (-Dbranch=new)
- One on your former code : excluding the new one and using a limited quality profile (-Dbranch=former)
Regards,
Freddy
On Tue, Jun 30, 2009 at 9:43 AM,
javadevdave@... <javadevdave@...> wrote:
ok, i try it :-)
My english is not the best, so please be lenient toward me...
I have some checkstyle rules defined in an XML-ruleFile.
My project has some legacy-code (some special packages) not touched in
the actual developing-phase. The rules in the rulefile should not be
checked for this legacy code. (this can be made by excluding source
code for a project, i know... )
BUT: Some very important rules, should be checked also in the legacy code!
So i need a filter (like checkstyle supression filters) where I can
say to each rule, which packages should be excluded from checking...
This is my use-case.. Is there a way to configure it with sonar? (or
the more easy way, to give a suppresion file for checkstyle to sonar?)
I only use this use-case actually for checkstyle, but i hope i can
adapt it to pmd, too... but there are some other problems to solve
first :-)
thanks...
2009/6/30 Freddy Mallet <freddy.mallet@...>:
> Hello Dave,
> Not sure to understand your use case.
> Could you just give an simple example ?
> Thanks
> Freddy
>
>
> On Mon, Jun 29, 2009 at 3:57 PM,
javadevdave@...
> <
javadevdave@...> wrote:
>>
>> Hello!
>>
>> One short question:
>>
>> There is a hint, that supression filters are not integrated.
>> Is there another way, to say to sonar, that I want to exclude some
>> packages / files for some indicators? (Not for all!!!!)
>>
>> Is it planned to be implemented it in the near future?!
>>
>> thanks....
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>
http://xircles.codehaus.org/manage_email
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email