diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-09-14 15:13:57 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-09-16 20:03:31 +0000 |
commit | d9127ca6f8567cdda2afcc7c97d649382a916877 (patch) | |
tree | 7f62b89197e69ffacbc9df96116507fdbb184835 | |
parent | 4e4fd97cc866af44d8aea415be2a0dd1f4eb32d1 (diff) | |
download | sonarqube-d9127ca6f8567cdda2afcc7c97d649382a916877.tar.gz sonarqube-d9127ca6f8567cdda2afcc7c97d649382a916877.zip |
SONAR-13798 Show NCLOC of the analysis when it's over the license's limit
2 files changed, 8 insertions, 0 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationCheck.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationCheck.java index 68a31aaa327..b9bce9ac015 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationCheck.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationCheck.java @@ -22,6 +22,7 @@ package org.sonar.ce.task.projectanalysis.measure; import org.sonar.api.ExtensionPoint; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder; +import org.sonar.ce.task.projectanalysis.component.Component; /** * Extension point that is called during processing of a task @@ -54,5 +55,7 @@ public interface PostMeasuresComputationCheck { */ int getNcloc(); + Component getRoot(); + } } diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationChecksStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationChecksStep.java index 10ff4ee0aa8..82390f9bad6 100644 --- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationChecksStep.java +++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/measure/PostMeasuresComputationChecksStep.java @@ -23,6 +23,7 @@ import java.util.Optional; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.measures.CoreMetrics; import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder; +import org.sonar.ce.task.projectanalysis.component.Component; import org.sonar.ce.task.projectanalysis.component.TreeRootHolder; import org.sonar.ce.task.projectanalysis.metric.Metric; import org.sonar.ce.task.projectanalysis.metric.MetricRepository; @@ -86,5 +87,9 @@ public class PostMeasuresComputationChecksStep implements ComputationStep { return nclocMeasure.map(Measure::getIntValue).orElse(0); } + @Override public Component getRoot() { + return treeRootHolder.getRoot(); + } + } } |