Skip to content

Commit e7cd419

Browse files
committed
fix(analysis): apply remaining review comments #4092
1 parent 740470a commit e7cd419

File tree

1 file changed

+2
-1
lines changed
  • analysis/analysers/parsers/UnifiedParser/src/main/kotlin/de/maibornwolff/codecharta/analysers/parsers/unified/metriccollectors

1 file changed

+2
-1
lines changed

analysis/analysers/parsers/UnifiedParser/src/main/kotlin/de/maibornwolff/codecharta/analysers/parsers/unified/metriccollectors/MetricCollector.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ abstract class MetricCollector(
7070
val startRow = currentNode.startPoint.row
7171
val endRow = currentNode.endPoint.row
7272

73-
if (nodeType != rootNodeType) {
73+
val skipRootToAvoidDoubleCountingLines = nodeType != rootNodeType
74+
if (skipRootToAvoidDoubleCountingLines) {
7475
for ((_, indexAndCalculateMetricForNodeFn) in metricInfo) {
7576
val (index, calculateMetricForNodeFn) = indexAndCalculateMetricForNodeFn
7677
metrics[index] += calculateMetricForNodeFn(currentNode, nodeType, startRow, endRow)

0 commit comments

Comments
 (0)