Lines of code limit problem (production license)

Answering to myself:

My assumption (I would love to have it confirmed, or contradicted) is that comment lines are summed too

Nope, wrong! The fact that in my case the “apparent” ncloc + the comment_lines was close to the “license” count of LOC was a coincidence.

I’ve now made an other script which crawls through branches of all my SQ projects, and the sum of the per-project maximum values of ncloc is (almost) exactly the LOC count (~9M) shown in the license page. I did not think there would be so much difference (20-25% on average apparently) between “main” (master) branches and “biggest” branches of these projects, which is why I was first looking for a different explanation.

So, my conclusions:

  • LOC” in the Plans & Pricing FAQ really means the same as the ncloc measure (which is of course convenient, and nice because we don’t pay for comments - no excuse for not writing javadoc :smile:)
  • having .Statistics.nclocByLanguage next to .Statistics.ncloc in /api/support/info is a bit misleading, because the former tells you about your “main” project branches, whereas the later tells you about your “biggest” project branches (that’s with SQ 8.7.1). It is an internal API though, I won’t complain, that was just me making wrong assumptions.
1 Like