0

I can see line based SCM blame information in UI, but where is it stored and how can I retrieve through web API?

I am using Perforce plugin.

The issue is that the Perforce plugin finds the blame information from history, and because of that if a user has created a debt in a past branch, it still shows on his name in the current branch analysis.

The Perforce plugin does not have any such way to disable looking into history beyond the current branch.

I need to find another way to find out, if the debt is really introduced in this branch or not.

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
Priyang
  • 376
  • 2
  • 7

1 Answers1

2

The real question here is how to find out this:

I need to find another way to find out, if the debt is really introduced in this branch or not.

The right way to do this has nothing to do with filtering out blame information and/or disable looking into history beyond the current branch.

The right approach to solve that use-case (is debt really introduced in this branch or not) is to set the Leak Period to the 'origin' of the branch. The SonarQube Project Space will then constantly give you the status of your project compared to that baseline (i.e. New Bugs, New Debt, Coverage on New Code etc. see Leak Period yellow pane on the right).

Nicolas B.
  • 7,245
  • 17
  • 29
  • Main issue is that sonar does not provide me a report which will tell me how many new issues introduced in this branch , so I am creating my own tool to solve this purpose. I can use Leak Period but that is still a UI level thing. I want a list of issues introduced and then I will filter it out by team member and send them daily report – Priyang Aug 18 '16 at 09:20
  • So.. you're trying to re-implement SonarQube right ? ;) The Leak Period is not a 'UI level thing', it's at the core of all the functionalities offered by SonarQube. Once it's set, you can [filter issues on the Leak Period](https://sonarqube.com/component_issues/index?id=org.sonarsource.java%3Ajava#resolved=false|sinceLeakPeriod=true), then filter them by team member if you wish (your developers also have direct access to _their_ issues). Really, for your use-case, no need to create a custom tool, just use SonarQube at its full potential. ;) – Nicolas B. Aug 18 '16 at 10:26
  • Its not I am re-implementing SonarQube, basically I don't see any report which will provide required results so just using API to generate data that I need. I finally found sonar "Source" API gives me the required information – Priyang Aug 29 '16 at 09:10