Duplicated lines since...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicated lines since...

Vincent Labatut
Hi,

I want to watch for newest duplicated lines in Sonar (3.7.3)

1/ the drill down for duplications doesn't have any history drop down choice (since previous analysis etc.)

2/ when I search for metrics. I can look for "Duplicated lines" as a Value (the values per file are correct). But if I select "Duplicated lines" where "since previous analysis" >= 1, there is no file selected.

3/ adding the column "Duplicated lines" "since previous analysis" shows there is no value stored per file.


All this makes me think that this metric is not historized per file in Sonar ? I need to detect what has been duplicated lately...


Thanks for your help,
Regards,
Vincent

Reply | Threaded
Open this post in threaded view
|

Re: Duplicated lines since...

David Racodon-2


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Jan 24, 2014 at 1:17 PM, Vincent Labatut <[hidden email]> wrote:
Hi,

I want to watch for newest duplicated lines in Sonar (3.7.3)

1/ the drill down for duplications doesn't have any history drop down choice (since previous analysis etc.)

2/ when I search for metrics. I can look for "Duplicated lines" as a Value (the values per file are correct). But if I select "Duplicated lines" where "since previous analysis" >= 1, there is no file selected.

3/ adding the column "Duplicated lines" "since previous analysis" shows there is no value stored per file.


All this makes me think that this metric is not historized per file in Sonar ? I need to detect what has been duplicated lately...


Thanks for your help,
Regards,
Vincent


Reply | Threaded
Open this post in threaded view
|

Re: Duplicated lines since...

Marc-2
Hi,

would like to vote for this feature.
How can I do that? Do I need an account? How do I get an account.

Kind regards
Marc


On 24.01.2014 14:02, David Racodon wrote:


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Jan 24, 2014 at 1:17 PM, Vincent Labatut <[hidden email]> wrote:
Hi,

I want to watch for newest duplicated lines in Sonar (3.7.3)

1/ the drill down for duplications doesn't have any history drop down choice (since previous analysis etc.)

2/ when I search for metrics. I can look for "Duplicated lines" as a Value (the values per file are correct). But if I select "Duplicated lines" where "since previous analysis" >= 1, there is no file selected.

3/ adding the column "Duplicated lines" "since previous analysis" shows there is no value stored per file.


All this makes me think that this metric is not historized per file in Sonar ? I need to detect what has been duplicated lately...


Thanks for your help,
Regards,
Vincent



Reply | Threaded
Open this post in threaded view
|

Re: Duplicated lines since...

David Racodon-2
Hi Marc,

I updated the sonarqube.org website to provide the link to create a JIRA account: http://www.sonarqube.org/get-involved/

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Tue, Jan 28, 2014 at 3:42 PM, Marc <[hidden email]> wrote:
Hi,

would like to vote for this feature.
How can I do that? Do I need an account? How do I get an account.

Kind regards
Marc



On 24.01.2014 14:02, David Racodon wrote:


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Jan 24, 2014 at 1:17 PM, Vincent Labatut <[hidden email]> wrote:
Hi,

I want to watch for newest duplicated lines in Sonar (3.7.3)

1/ the drill down for duplications doesn't have any history drop down choice (since previous analysis etc.)

2/ when I search for metrics. I can look for "Duplicated lines" as a Value (the values per file are correct). But if I select "Duplicated lines" where "since previous analysis" >= 1, there is no file selected.

3/ adding the column "Duplicated lines" "since previous analysis" shows there is no value stored per file.


All this makes me think that this metric is not historized per file in Sonar ? I need to detect what has been duplicated lately...


Thanks for your help,
Regards,
Vincent




Reply | Threaded
Open this post in threaded view
|

Re: Duplicated lines since...

Vincent Labatut
Hi all,

I'm replying to an old thread regarding to tracking the latest code duplications.

In this feature request, http://jira.codehaus.org/browse/SONAR-4246
Fabrice indicates "This is already possible to know in which files new duplicated blocks have been detected, but when going to the "Duplication" tab, this is not possible to know which block(s) has been introduced if there are many existing duplications."

What does he mean by this is already possible? The data is in the database (or can be deduced from)?

Because when I use the API to query for duplications history, I get values at project or module level, but not at file level.

Regards,
Vincent





On Tue, Jan 28, 2014 at 11:43 PM, David Racodon <[hidden email]> wrote:
Hi Marc,

I updated the sonarqube.org website to provide the link to create a JIRA account: http://www.sonarqube.org/get-involved/

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Tue, Jan 28, 2014 at 3:42 PM, Marc <[hidden email]> wrote:
Hi,

would like to vote for this feature.
How can I do that? Do I need an account? How do I get an account.

Kind regards
Marc



On 24.01.2014 14:02, David Racodon wrote:


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Jan 24, 2014 at 1:17 PM, Vincent Labatut <[hidden email]> wrote:
Hi,

I want to watch for newest duplicated lines in Sonar (3.7.3)

1/ the drill down for duplications doesn't have any history drop down choice (since previous analysis etc.)

2/ when I search for metrics. I can look for "Duplicated lines" as a Value (the values per file are correct). But if I select "Duplicated lines" where "since previous analysis" >= 1, there is no file selected.

3/ adding the column "Duplicated lines" "since previous analysis" shows there is no value stored per file.


All this makes me think that this metric is not historized per file in Sonar ? I need to detect what has been duplicated lately...


Thanks for your help,
Regards,
Vincent





Reply | Threaded
Open this post in threaded view
|

Re: Duplicated lines since...

Fabrice Bellingard-4
On Thu, Jun 5, 2014 at 10:06 AM, Vincent Labatut <[hidden email]> wrote:
Hi all,

Hi Vincent,
 
I'm replying to an old thread regarding to tracking the latest code duplications.

In this feature request, http://jira.codehaus.org/browse/SONAR-4246
Fabrice indicates "This is already possible to know in which files new duplicated blocks have been detected, but when going to the "Duplication" tab, this is not possible to know which block(s) has been introduced if there are many existing duplications."

What does he mean by this is already possible? The data is in the database (or can be deduced from)?

What's possible is to know that duplications have been added/removed on a file if you activated the "Duplicated Blocks" rule(s) in your quality profile. Indeed, in this case:
  • When a duplication is introduced on a file that had no duplication, a new issue is created so it's easy to track this with the issue drilldown
  • When duplications are added to a file that already had some, then this can be seen on the message and the changelog of the issue - but the UI currently does not provide an easy way to track this 
In any case, you will just know that duplications have been added or removed, but you won't be able to know more detail about this. I.e. if your file already had 1 duplication and you detect that 1 has been added, you won't know which the initial one was and which the added one is. We don't have this information in the DB yet.

 
Because when I use the API to query for duplications history, I get values at project or module level, but not at file level.

Regards,
Vincent





On Tue, Jan 28, 2014 at 11:43 PM, David Racodon <[hidden email]> wrote:
Hi Marc,

I updated the sonarqube.org website to provide the link to create a JIRA account: http://www.sonarqube.org/get-involved/

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Tue, Jan 28, 2014 at 3:42 PM, Marc <[hidden email]> wrote:
Hi,

would like to vote for this feature.
How can I do that? Do I need an account? How do I get an account.

Kind regards
Marc



On 24.01.2014 14:02, David Racodon wrote:


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Jan 24, 2014 at 1:17 PM, Vincent Labatut <[hidden email]> wrote:
Hi,

I want to watch for newest duplicated lines in Sonar (3.7.3)

1/ the drill down for duplications doesn't have any history drop down choice (since previous analysis etc.)

2/ when I search for metrics. I can look for "Duplicated lines" as a Value (the values per file are correct). But if I select "Duplicated lines" where "since previous analysis" >= 1, there is no file selected.

3/ adding the column "Duplicated lines" "since previous analysis" shows there is no value stored per file.


All this makes me think that this metric is not historized per file in Sonar ? I need to detect what has been duplicated lately...


Thanks for your help,
Regards,
Vincent






Reply | Threaded
Open this post in threaded view
|

Re: Duplicated lines since...

Vincent Labatut
Hi Fabrice, and thanks for the detailed explanations!

I've just tried the "Duplicated Blocks" rule and could experience all what you said.

With the API, I can the get the number of duplicated lines per file, but only for the latest version. The history at file level does not work with time machine (always empty) => I really have the feeling that for each file (FIL), and for metrics that concern duplications, only the latest values are kept in the DB.

So we are about to write a utility to help us track when and where the code has been duplicated. Not exactly which lines but the number duplicated lines per file, multiple times a day. Then write a small client tool that will help detecting *when* the lines have been duplicated.

I know it sounds like developing some sonar features outside of sonar, but we can't wait.

Unless someone tells us it is as difficult to code this than implementing the proper logic and GUI in SonarQube, but I doubt it.



Regards,
Vincent






 





On Thu, Jun 5, 2014 at 2:43 PM, Fabrice Bellingard <[hidden email]> wrote:
On Thu, Jun 5, 2014 at 10:06 AM, Vincent Labatut <[hidden email]> wrote:
Hi all,

Hi Vincent,
 
I'm replying to an old thread regarding to tracking the latest code duplications.

In this feature request, http://jira.codehaus.org/browse/SONAR-4246
Fabrice indicates "This is already possible to know in which files new duplicated blocks have been detected, but when going to the "Duplication" tab, this is not possible to know which block(s) has been introduced if there are many existing duplications."

What does he mean by this is already possible? The data is in the database (or can be deduced from)?

What's possible is to know that duplications have been added/removed on a file if you activated the "Duplicated Blocks" rule(s) in your quality profile. Indeed, in this case:
  • When a duplication is introduced on a file that had no duplication, a new issue is created so it's easy to track this with the issue drilldown
  • When duplications are added to a file that already had some, then this can be seen on the message and the changelog of the issue - but the UI currently does not provide an easy way to track this 
In any case, you will just know that duplications have been added or removed, but you won't be able to know more detail about this. I.e. if your file already had 1 duplication and you detect that 1 has been added, you won't know which the initial one was and which the added one is. We don't have this information in the DB yet.

 
Because when I use the API to query for duplications history, I get values at project or module level, but not at file level.

Regards,
Vincent





On Tue, Jan 28, 2014 at 11:43 PM, David Racodon <[hidden email]> wrote:
Hi Marc,

I updated the sonarqube.org website to provide the link to create a JIRA account: http://www.sonarqube.org/get-involved/

Regards,


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Tue, Jan 28, 2014 at 3:42 PM, Marc <[hidden email]> wrote:
Hi,

would like to vote for this feature.
How can I do that? Do I need an account? How do I get an account.

Kind regards
Marc



On 24.01.2014 14:02, David Racodon wrote:


David RACODON | SonarSource
Senior Consultant

---------------------------------------------
  Sign up to our newsletter here!
---------------------------------------------


On Fri, Jan 24, 2014 at 1:17 PM, Vincent Labatut <[hidden email]> wrote:
Hi,

I want to watch for newest duplicated lines in Sonar (3.7.3)

1/ the drill down for duplications doesn't have any history drop down choice (since previous analysis etc.)

2/ when I search for metrics. I can look for "Duplicated lines" as a Value (the values per file are correct). But if I select "Duplicated lines" where "since previous analysis" >= 1, there is no file selected.

3/ adding the column "Duplicated lines" "since previous analysis" shows there is no value stored per file.


All this makes me think that this metric is not historized per file in Sonar ? I need to detect what has been duplicated lately...


Thanks for your help,
Regards,
Vincent







Reply | Threaded
Open this post in threaded view
|

Re: Duplicated lines since...

mattadamson
This post has NOT been accepted by the mailing list yet.
In reply to this post by Vincent Labatut
Hi

We're very interested in this feature too. Did you manage to create the utility to report on newly added duplications as we'd like to see this?

Thanks

Matt