Sonar

Sonar WS API return all elements when there aren't metric value

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.10
  • Component/s: API
  • Labels:
    None
  • Number of attachments :
    0

Description

The request:

http://nemo.sonar.codehaus.org/api/resources?resource=org.codehaus.sonar.plugins:sonar-plugin-findbugs&metrics=duplicated_lines&scopes=FIL&depth=-1&limit=5&format=xml

returns all files in the module (without limit), but without metric value (the document has not msr elements). This occurs when value of duplicated_lines is 0 (for instance, in sonar-plugin-findbugs).

The above request should return the first 5 resources (files in this case) all with duplicated_lines set to 0.

Issue Links

Activity

Hide
Antonio Manuel Muñiz Martín added a comment -

This bug affects version 1.8 of Sonar and component API.
Sorry.

Show
Antonio Manuel Muñiz Martín added a comment - This bug affects version 1.8 of Sonar and component API. Sorry.
Hide
Simon Brandhof added a comment -

The problem is that the zero value is not inserted when a file has no duplicated lines. That's why I think that this request should return no resources, but not the 5 first ones.

Show
Simon Brandhof added a comment - The problem is that the zero value is not inserted when a file has no duplicated lines. That's why I think that this request should return no resources, but not the 5 first ones.
Hide
Antonio Manuel Muñiz Martín added a comment -

Ok. I'm with you. It should return no resources.
I have write a workarround in pdf-report for this bad behaviour. When this issue will be fixed I will update pdf-report.

Thanks,
Antonio.

Show
Antonio Manuel Muñiz Martín added a comment - Ok. I'm with you. It should return no resources. I have write a workarround in pdf-report for this bad behaviour. When this issue will be fixed I will update pdf-report. Thanks, Antonio.
Hide
Freddy Mallet added a comment -

tested

Show
Freddy Mallet added a comment - tested

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: