We’re introducing New Lines of Code (new_ncloc) in SonarQube Cloud. It will also be included in the next version of SonarQube Server.
How the three measures are different:
-
ncloc: All non-comment, non-whitespace code lines.
-
new_ncloc: The same definition, limited to the new-code period.
-
new_lines: All physically changed lines, including comments and whitespace.
Previously, new code had a New Lines measure but no matching New Lines of Code measure. This could create apparent inconsistencies, such as projects with more New Lines than total Lines of Code when changes include configuration, comments, or whitespace.
You’ll see New Lines of Code across SonarQube Cloud:
-
Project cards in the New Code perspective use New Lines of Code as their size measure.
-
Pull request and short-lived branch summaries report New Lines of Code in their code-size metadata.
-
Measures includes New Lines of Code in the Size domain.
-
New-code treemaps are sized and sorted using this measure.
New Lines remains available when you need the total number of physically changed lines.
It become available as projects are analyzed so you will not see it until you run a new analysis on your project.
