Search code examples
sonarqubesonarqube-web

How to get reuse lines of code using SonarQube API


Is it possible to use the API to get sum of reused lines of code? Please advise.

Additional info:

  1. Reused LOC = number of lines of code from initial baseline (before start of evolution on Project independent of later deletion of code)

  2. Deleted LOC are not taken into account

  3. Comments, test scripts, automated generated lines are excluded. Only source code for operational software is included

Regards, Mircea


Solution

  • What you want is Lines of Code - New Lines of Code, and API calls certainly exist to get these values.