I wrote a script that went through every branch of every project to get the max lines of code. When I add these up I get 892,063 but the License Manager says we are at 999,966. I compared the locs from my script to what I see in the projects screen in the UI and they match the lower number.
Get all projects snippet
$ProjectsApiUrl = "$SonarUrl/api/projects/search?ps=500&p=$page"
Get all branches call snippet
$BranchesApiUrl = "$SonarUrl/api/project_branches/list?project=$ProjectKey"
Snag lines of code for a branch snippet
$MeasuresApiUrl = "$SonarUrl/api/measures/component?component=$ProjectKey&branch=$BranchName&metricKeys=ncloc"
$BranchLOC = ($MeasuresResponse.component.measures | Where-Object { $_.metric -eq "ncloc" } | Select-Object -ExpandProperty value) -as [int]
Is this a bug or am I doing somehging wrong?
Thanks
Rob