Hello,
I would like to get the number of lines of code by language on my SonarQube instance in order to create a custom prometheus exporter. I’m using SonarQube 8.9.8.54436
I saw that an api (api/system/info) was available and was returning a key “nclocByLanguage”. However, the sum I get for all the ncloc of the detected languages don’t match up with the other metric named “ncloc”.
Here is what I got
"ncloc": 168724,
"nclocByLanguage": [
{
"language": "css",
"ncloc": 132
},
{
"language": "java",
"ncloc": 880
},
{
"language": "web",
"ncloc": 42
},
{
"language": "xml",
"ncloc": 1848
},
{
"language": "go",
"ncloc": 2715
},
{
"language": "js",
"ncloc": 7033
}
],
What happened to the other 100k + lines that are appearing on the ncloc metric ?
Is this because the langage of those lines is not well detected ?
Best Regards