Quantcast

Disable duplication selectively on some classes?

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

Disable duplication selectively on some classes?

Reynald Borer
Hi everyone,

First of all, congrats to the sonar team for the 3.3 release that was
recently delivered. I've smoothly upgraded my installation and I'm
discovering the new features, another great release, as usual :-)

I've a situation where I would like to be able to selectively disable
the code duplication check on some java classes. Indeed I'm working on
a project where we expose versioned web services, meaning that for
each new release, we have to clone quite a lot of classes to match the
service version (probably not the right technology to use here I
agree). Now of course all those copied classes on purpose appears as
duplication, so this metric is not really usable for this project.

Any way I could achieve that? Of course I could completely exclude
such classes from Sonar analysis, but then I would lose some other
useful findbugs & pmd checks.

Thanks,
Reynald

---------------------------------------------------------------------
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: Disable duplication selectively on some classes?

Ann Campbell
Exclude them from analysis on all but the first version? You can still refer to it for violations, but not see cross-project duplications on them.

Alternately, turn off cross-project duplication scanning on all versions?


---
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720



On Wed, Oct 24, 2012 at 11:51 AM, Reynald Borer <[hidden email]> wrote:
Hi everyone,

First of all, congrats to the sonar team for the 3.3 release that was
recently delivered. I've smoothly upgraded my installation and I'm
discovering the new features, another great release, as usual :-)

I've a situation where I would like to be able to selectively disable
the code duplication check on some java classes. Indeed I'm working on
a project where we expose versioned web services, meaning that for
each new release, we have to clone quite a lot of classes to match the
service version (probably not the right technology to use here I
agree). Now of course all those copied classes on purpose appears as
duplication, so this metric is not really usable for this project.

Any way I could achieve that? Of course I could completely exclude
such classes from Sonar analysis, but then I would lose some other
useful findbugs & pmd checks.

Thanks,
Reynald

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

    http://xircles.codehaus.org/manage_email




**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

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

Re: Disable duplication selectively on some classes?

Freddy Mallet
Hi Reynald, 

What Ann is suggesting is a good approach but I'm not even sure that all "copied" versions of your web service are located in different projects ? 
-----
Sonar for Continuous Inspection



On Thu, Oct 25, 2012 at 2:26 PM, Ann Campbell <[hidden email]> wrote:
Exclude them from analysis on all but the first version? You can still refer to it for violations, but not see cross-project duplications on them.

Alternately, turn off cross-project duplication scanning on all versions?


---
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720



On Wed, Oct 24, 2012 at 11:51 AM, Reynald Borer <[hidden email]> wrote:
Hi everyone,

First of all, congrats to the sonar team for the 3.3 release that was
recently delivered. I've smoothly upgraded my installation and I'm
discovering the new features, another great release, as usual :-)

I've a situation where I would like to be able to selectively disable
the code duplication check on some java classes. Indeed I'm working on
a project where we expose versioned web services, meaning that for
each new release, we have to clone quite a lot of classes to match the
service version (probably not the right technology to use here I
agree). Now of course all those copied classes on purpose appears as
duplication, so this metric is not really usable for this project.

Any way I could achieve that? Of course I could completely exclude
such classes from Sonar analysis, but then I would lose some other
useful findbugs & pmd checks.

Thanks,
Reynald

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

    http://xircles.codehaus.org/manage_email




**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************


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

Re: Disable duplication selectively on some classes?

Reynald Borer
Hi Ann, Freddy,

Actually all those classes are in the same project, I'm not using cross-projects duplication here.

Ann, thanks for the suggestion, I'll try this approach even if it also disable violations on those classes (but it's ok as it's mostly DTO classes). Keeping only the most recent version of such DTOs under sonar radar should be sufficient.

I'll keep you posted.

Reynald


On Friday, October 26, 2012 at 16:22 , Freddy Mallet wrote:

> Hi Reynald,
>
> What Ann is suggesting is a good approach but I'm not even sure that all "copied" versions of your web service are located in different projects ?
> -----
> twitter.com/FreddyMallet (https://twitter.com/FreddyMallet)
> Sonar for Continuous Inspection
>
>
>
> On Thu, Oct 25, 2012 at 2:26 PM, Ann Campbell <[hidden email] (mailto:[hidden email])> wrote:
> > Exclude them from analysis on all but the first version? You can still refer to it for violations, but not see cross-project duplications on them.
> >
> > Alternately, turn off cross-project duplication scanning on all versions?
> >
> >
> > ---
> > G. Ann Campbell
> > Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> > Shaw Industries Inc,
> > 201 S. Hamilton St.
> > Dalton Ga 30720
> >
> >
> >
> > On Wed, Oct 24, 2012 at 11:51 AM, Reynald Borer <[hidden email] (mailto:[hidden email])> wrote:
> > > Hi everyone,
> > >
> > > First of all, congrats to the sonar team for the 3.3 release that was
> > > recently delivered. I've smoothly upgraded my installation and I'm
> > > discovering the new features, another great release, as usual :-)
> > >
> > > I've a situation where I would like to be able to selectively disable
> > > the code duplication check on some java classes. Indeed I'm working on
> > > a project where we expose versioned web services, meaning that for
> > > each new release, we have to clone quite a lot of classes to match the
> > > service version (probably not the right technology to use here I
> > > agree). Now of course all those copied classes on purpose appears as
> > > duplication, so this metric is not really usable for this project.
> > >
> > > Any way I could achieve that? Of course I could completely exclude
> > > such classes from Sonar analysis, but then I would lose some other
> > > useful findbugs & pmd checks.
> > >
> > > Thanks,
> > > Reynald
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe from this list, please visit:
> > >
> > > http://xircles.codehaus.org/manage_email
> >
> >
> > **********************************************************
> > Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
> > If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
> > Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries.
> > **********************************************************
>




---------------------------------------------------------------------
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: Disable duplication selectively on some classes?

Ann Campbell
I'm sorry, but I have to ask why you need multiple iterations of the same web service client in a single project...


---
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720



On Fri, Oct 26, 2012 at 3:23 PM, Reynald Borer <[hidden email]> wrote:
Hi Ann, Freddy,

Actually all those classes are in the same project, I'm not using cross-projects duplication here.

Ann, thanks for the suggestion, I'll try this approach even if it also disable violations on those classes (but it's ok as it's mostly DTO classes). Keeping only the most recent version of such DTOs under sonar radar should be sufficient.

I'll keep you posted.

Reynald


On Friday, October 26, 2012 at 16:22 , Freddy Mallet wrote:

> Hi Reynald,
>
> What Ann is suggesting is a good approach but I'm not even sure that all "copied" versions of your web service are located in different projects ?
> -----
> twitter.com/FreddyMallet (https://twitter.com/FreddyMallet)
> Sonar for Continuous Inspection
>
>
>
> On Thu, Oct 25, 2012 at 2:26 PM, Ann Campbell <[hidden email] (mailto:[hidden email])> wrote:
> > Exclude them from analysis on all but the first version? You can still refer to it for violations, but not see cross-project duplications on them.
> >
> > Alternately, turn off cross-project duplication scanning on all versions?
> >
> >
> > ---
> > G. Ann Campbell
> > Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> > Shaw Industries Inc,
> > 201 S. Hamilton St.
> > Dalton Ga 30720
> >
> >
> >
> > On Wed, Oct 24, 2012 at 11:51 AM, Reynald Borer <[hidden email] (mailto:[hidden email])> wrote:
> > > Hi everyone,
> > >
> > > First of all, congrats to the sonar team for the 3.3 release that was
> > > recently delivered. I've smoothly upgraded my installation and I'm
> > > discovering the new features, another great release, as usual :-)
> > >
> > > I've a situation where I would like to be able to selectively disable
> > > the code duplication check on some java classes. Indeed I'm working on
> > > a project where we expose versioned web services, meaning that for
> > > each new release, we have to clone quite a lot of classes to match the
> > > service version (probably not the right technology to use here I
> > > agree). Now of course all those copied classes on purpose appears as
> > > duplication, so this metric is not really usable for this project.
> > >
> > > Any way I could achieve that? Of course I could completely exclude
> > > such classes from Sonar analysis, but then I would lose some other
> > > useful findbugs & pmd checks.
> > >
> > > Thanks,
> > > Reynald
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe from this list, please visit:
> > >
> > > http://xircles.codehaus.org/manage_email
> >
> >
> > **********************************************************
> > Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
> > If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
> > Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries.
> > **********************************************************
>




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

    http://xircles.codehaus.org/manage_email




**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

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

Re: Disable duplication selectively on some classes?

Reynald Borer
My project does not contain web service clients, I'm exposing Java services as web services on the Internet. And my services are versioned, so that whenever I release a new version of a given service, the clients have some time to adapt their code to this new version while the old one remains available.



On Monday, October 29, 2012 at 13:31 , Ann Campbell wrote:

> I'm sorry, but I have to ask why you need multiple iterations of the same web service client in a single project...
>
>
> ---
> G. Ann Campbell
> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> Shaw Industries Inc,
> 201 S. Hamilton St.
> Dalton Ga 30720
>
>
>
> On Fri, Oct 26, 2012 at 3:23 PM, Reynald Borer <[hidden email] (mailto:[hidden email])> wrote:
> > Hi Ann, Freddy,
> >
> > Actually all those classes are in the same project, I'm not using cross-projects duplication here.
> >
> > Ann, thanks for the suggestion, I'll try this approach even if it also disable violations on those classes (but it's ok as it's mostly DTO classes). Keeping only the most recent version of such DTOs under sonar radar should be sufficient.
> >
> > I'll keep you posted.
> >
> > Reynald
> >
> >
> > On Friday, October 26, 2012 at 16:22 , Freddy Mallet wrote:
> >
> > > Hi Reynald,
> > >
> > > What Ann is suggesting is a good approach but I'm not even sure that all "copied" versions of your web service are located in different projects ?
> > > -----
> > > twitter.com/FreddyMallet (http://twitter.com/FreddyMallet) (https://twitter.com/FreddyMallet)
> > > Sonar for Continuous Inspection
> > >
> > >
> > >
> > > On Thu, Oct 25, 2012 at 2:26 PM, Ann Campbell <[hidden email] (mailto:[hidden email]) (mailto:[hidden email])> wrote:
> > > > Exclude them from analysis on all but the first version? You can still refer to it for violations, but not see cross-project duplications on them.
> > > >
> > > > Alternately, turn off cross-project duplication scanning on all versions?
> > > >
> > > >
> > > > ---
> > > > G. Ann Campbell
> > > > Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> > > > Shaw Industries Inc,
> > > > 201 S. Hamilton St.
> > > > Dalton Ga 30720
> > > >
> > > >
> > > >
> > > > On Wed, Oct 24, 2012 at 11:51 AM, Reynald Borer <[hidden email] (mailto:[hidden email]) (mailto:[hidden email])> wrote:
> > > > > Hi everyone,
> > > > >
> > > > > First of all, congrats to the sonar team for the 3.3 release that was
> > > > > recently delivered. I've smoothly upgraded my installation and I'm
> > > > > discovering the new features, another great release, as usual :-)
> > > > >
> > > > > I've a situation where I would like to be able to selectively disable
> > > > > the code duplication check on some java classes. Indeed I'm working on
> > > > > a project where we expose versioned web services, meaning that for
> > > > > each new release, we have to clone quite a lot of classes to match the
> > > > > service version (probably not the right technology to use here I
> > > > > agree). Now of course all those copied classes on purpose appears as
> > > > > duplication, so this metric is not really usable for this project.
> > > > >
> > > > > Any way I could achieve that? Of course I could completely exclude
> > > > > such classes from Sonar analysis, but then I would lose some other
> > > > > useful findbugs & pmd checks.
> > > > >
> > > > > Thanks,
> > > > > Reynald
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe from this list, please visit:
> > > > >
> > > > > http://xircles.codehaus.org/manage_email
> > > >
> > > >
> > > > **********************************************************
> > > > Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
> > > > If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
> > > > Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries.
> > > > **********************************************************
> > >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
>
>
> **********************************************************
> Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
> If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
> Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries.
> **********************************************************




---------------------------------------------------------------------
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: Disable duplication selectively on some classes?

Ann Campbell
That makes perfect sense! :-)


---
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720



On Mon, Oct 29, 2012 at 3:32 PM, Reynald Borer <[hidden email]> wrote:
My project does not contain web service clients, I'm exposing Java services as web services on the Internet. And my services are versioned, so that whenever I release a new version of a given service, the clients have some time to adapt their code to this new version while the old one remains available.



On Monday, October 29, 2012 at 13:31 , Ann Campbell wrote:

> I'm sorry, but I have to ask why you need multiple iterations of the same web service client in a single project...
>
>
> ---
> G. Ann Campbell
> Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> Shaw Industries Inc,
> 201 S. Hamilton St.
> Dalton Ga 30720
>
>
>
> On Fri, Oct 26, 2012 at 3:23 PM, Reynald Borer <[hidden email] (mailto:[hidden email])> wrote:
> > Hi Ann, Freddy,
> >
> > Actually all those classes are in the same project, I'm not using cross-projects duplication here.
> >
> > Ann, thanks for the suggestion, I'll try this approach even if it also disable violations on those classes (but it's ok as it's mostly DTO classes). Keeping only the most recent version of such DTOs under sonar radar should be sufficient.
> >
> > I'll keep you posted.
> >
> > Reynald
> >
> >
> > On Friday, October 26, 2012 at 16:22 , Freddy Mallet wrote:
> >
> > > Hi Reynald,
> > >
> > > What Ann is suggesting is a good approach but I'm not even sure that all "copied" versions of your web service are located in different projects ?
> > > -----
> > > twitter.com/FreddyMallet (http://twitter.com/FreddyMallet) (https://twitter.com/FreddyMallet)
> > > Sonar for Continuous Inspection
> > >
> > >
> > >
> > > On Thu, Oct 25, 2012 at 2:26 PM, Ann Campbell <[hidden email] (mailto:[hidden email]) (mailto:[hidden email])> wrote:
> > > > Exclude them from analysis on all but the first version? You can still refer to it for violations, but not see cross-project duplications on them.
> > > >
> > > > Alternately, turn off cross-project duplication scanning on all versions?
> > > >
> > > >
> > > > ---
> > > > G. Ann Campbell
> > > > Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
> > > > Shaw Industries Inc,
> > > > 201 S. Hamilton St.
> > > > Dalton Ga 30720
> > > >
> > > >
> > > >
> > > > On Wed, Oct 24, 2012 at 11:51 AM, Reynald Borer <[hidden email] (mailto:[hidden email]) (mailto:[hidden email])> wrote:
> > > > > Hi everyone,
> > > > >
> > > > > First of all, congrats to the sonar team for the 3.3 release that was
> > > > > recently delivered. I've smoothly upgraded my installation and I'm
> > > > > discovering the new features, another great release, as usual :-)
> > > > >
> > > > > I've a situation where I would like to be able to selectively disable
> > > > > the code duplication check on some java classes. Indeed I'm working on
> > > > > a project where we expose versioned web services, meaning that for
> > > > > each new release, we have to clone quite a lot of classes to match the
> > > > > service version (probably not the right technology to use here I
> > > > > agree). Now of course all those copied classes on purpose appears as
> > > > > duplication, so this metric is not really usable for this project.
> > > > >
> > > > > Any way I could achieve that? Of course I could completely exclude
> > > > > such classes from Sonar analysis, but then I would lose some other
> > > > > useful findbugs & pmd checks.
> > > > >
> > > > > Thanks,
> > > > > Reynald
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe from this list, please visit:
> > > > >
> > > > > http://xircles.codehaus.org/manage_email
> > > >
> > > >
> > > > **********************************************************
> > > > Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
> > > > If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
> > > > Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries.
> > > > **********************************************************
> > >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
>
>
> **********************************************************
> Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
> If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
> Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company or its subsidiaries.
> **********************************************************




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

    http://xircles.codehaus.org/manage_email




**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Loading...