Difference beetween lines of code and lines

Hi everyone,

What is the difference beetween lines of code and lines.

I have a project that has 187,730 lines of code and 245,077 line.

Which of these parameters affects the license?

When I consults the API in /api/measures/component/component?=name_project&metricKeys=ncloc, some times the endpoint response is null, what’s happening in this cases?

Hey there.

// This is not a line of code, it's a comment
var i = 0; // This is a line of code

//The above line is not a line of code, because it's a blank line. This line is also not a line of code, because it's a comment
var i = 1 // This is a line of code

I hope that helps. :slight_smile: It might help to know that ncloc stands for non-comment lines of code

Lines of files that could not be parsed correctly (due to syntax errors or another issue during analysis time) but that were indexed by the scanner also count towards Lines, but not Lines of Code.

Configuration files are also not Lines of Code (a Pom.xml for example)

Lines of Code is the only measure used to determine license utilization.

Do you have an example API response and a screenshot of the matching project in the UI? This can happen, for example, if a project has never been analyzed.

Hi Colin, thanks for your replay (like allways).

I can’t take an example right now, but gonna try to get all branches of the projects and get the lines of code from the branches and compare those lines of code.

@Colin This work for me (I have the same lines of code in the proyects and the licence, when I add them).

thanks for your explanation anyway.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.