on this page : Plans & Pricing | Sonar, we can read :
How do we count Lines of Code (LOC)?
LOCs are computed by summing up the LOCs of each project analyzed. Lines of test code are never included in this number. The LOCs used for a project are the ones found during the most recent analysis of this project. If you start using the branch analysis, then the LOCs of a project will be computed from the project’s largest branch.
We have a few questions about this definition :
Is this “LOC” equal to sum of “ncloc” measure ? or sum of “ncloc + comment_lines” ?
What is the definition of “largest” here ? biggest nb of commits ? biggest ncloc ? biggest “ncloc + comment_lines” ? Something else ?
About “Lines of test code are never included in this number.” This is clear, but strange because according to the custom rules API, you can create a rule targetting test code (like checking the presence of “assertions” in test code).