New metric for number of generated lines of code

sonarcloud
sonarqube

(Amaury Levé) #1

Some user seems interested in being able to see a new metric showing the number of line of generated code.

Cheers,
Amaury


(Fabrice Bellingard) #2

@Ammo This metric exists in SonarQube/Cloud. Actually, there are 2 of them:

  • generated_lines
  • generated_ncloc

And obviously, It’s up to each analyzer to feed them.


(Alejandro Del Rincón López) #3

As I understand, those metrics are in the core “SonarQube”, but not present in the sonarcsharp analyzer, right? This metric will be a lot useful as we have a project with a lot of generated code and we want to calculate the portion of the code that is generated.


(Amaury Levé) #4

Hi @alexdrl,

You are right. I have created a ticket in C# for us to implement this feature: https://github.com/SonarSource/sonar-csharp/issues/1808

Cheers,
Amaury