Count total lines of code for each language on the server

(Steve) #1

Hello SonarQube Community!

I’m looking to find the total lines of code on the server for each language being scanned on my server.

Any suggestions on how I can programmatically/easily get the nloc for each language being scanned?

I would like to be able to get a report that the server is analyzing

  • X nloc java
  • Y nloc C#
  • Z nloc Python

Any suggestions on how to go about this rather than going through each dashboard by hand?

I looked at the API and getting the nloc for each project is okay, but I don’t see how I can specify the language I would like to focus on - it seemed to return the total amount of all the languages being scanned for that project.

I’m on 6.7



(G Ann Campbell) #2

Hi Steve,

This should help:


(Steve) #3

Thanks again, Ann!

I didn’t think to download the System Info ; but I did look under the System Info screen.