summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-25 23:43:15 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-25 23:43:15 +0200
commita6b89586c85dcb6520fba609279d91aba0ca9a14 (patch)
treedf7345944c10015c1c073bb9e3cc72090fe91642 /plugins
parente03ff516d8d2c01675848d281e76d814f7e16a82 (diff)
downloadsonarqube-a6b89586c85dcb6520fba609279d91aba0ca9a14.tar.gz
sonarqube-a6b89586c85dcb6520fba609279d91aba0ca9a14.zip
Ignore sonar.dynamicAnalysis in core coverage decorators
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java2
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java12
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java12
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java12
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java12
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java12
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java12
7 files changed, 1 insertions, 73 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java
index e4153b67b16..41973ea7239 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java
@@ -34,7 +34,7 @@ import java.util.Collection;
public abstract class AbstractCoverageDecorator implements Decorator {
public boolean shouldExecuteOnProject(Project project) {
- return project.getAnalysisType().isDynamic(true);
+ return true;
}
@DependedUpon
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java
index 2a3c3ead33c..4ca1bd15a5e 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/CoverageDecoratorTest.java
@@ -57,18 +57,6 @@ public class CoverageDecoratorTest {
}
@Test
- public void noCoverageWhenStaticAnalysis() {
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.STATIC);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isFalse();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.REUSE_REPORTS);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isTrue();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.DYNAMIC);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isTrue();
- }
-
- @Test
public void coverage() {
DecoratorContext context = mockContext(50, 40, 10, 8);
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java
index 2ed500d0d70..3ceb343672a 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItCoverageDecoratorTest.java
@@ -57,18 +57,6 @@ public class ItCoverageDecoratorTest {
}
@Test
- public void noCoverageWhenStaticAnalysis() {
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.STATIC);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isFalse();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.REUSE_REPORTS);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isTrue();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.DYNAMIC);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isTrue();
- }
-
- @Test
public void coverage() {
DecoratorContext context = mockContext(50, 40, 10, 8);
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java
index 3bbf5352e2c..ccb7abcf907 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ItLineCoverageDecoratorTest.java
@@ -55,18 +55,6 @@ public class ItLineCoverageDecoratorTest {
}
@Test
- public void noCoverageWhenStaticAnalysis() {
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.STATIC);
- assertThat(decorator.shouldExecuteOnProject(project)).isFalse();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.REUSE_REPORTS);
- assertThat(decorator.shouldExecuteOnProject(project)).isTrue();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.DYNAMIC);
- assertThat(decorator.shouldExecuteOnProject(project)).isTrue();
- }
-
- @Test
public void lineCoverage() {
DecoratorContext context = mockContext(50, 10);
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java
index a0c12521f86..4b89904efee 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/LineCoverageDecoratorTest.java
@@ -55,18 +55,6 @@ public class LineCoverageDecoratorTest {
}
@Test
- public void noCoverageWhenStaticAnalysis() {
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.STATIC);
- assertThat(decorator.shouldExecuteOnProject(project)).isFalse();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.REUSE_REPORTS);
- assertThat(decorator.shouldExecuteOnProject(project)).isTrue();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.DYNAMIC);
- assertThat(decorator.shouldExecuteOnProject(project)).isTrue();
- }
-
- @Test
public void lineCoverage() {
DecoratorContext context = mockContext(50, 10);
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java
index 4dfdfd504fc..e4dbb3dbc94 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallCoverageDecoratorTest.java
@@ -57,18 +57,6 @@ public class OverallCoverageDecoratorTest {
}
@Test
- public void noCoverageWhenStaticAnalysis() {
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.STATIC);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isFalse();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.REUSE_REPORTS);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isTrue();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.DYNAMIC);
- assertThat(new CoverageDecorator().shouldExecuteOnProject(project)).isTrue();
- }
-
- @Test
public void coverage() {
DecoratorContext context = mockContext(50, 40, 10, 8);
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java
index f761dc11e80..1b3c0db8a18 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/OverallLineCoverageDecoratorTest.java
@@ -56,18 +56,6 @@ public class OverallLineCoverageDecoratorTest {
}
@Test
- public void noCoverageWhenStaticAnalysis() {
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.STATIC);
- assertThat(decorator.shouldExecuteOnProject(project)).isFalse();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.REUSE_REPORTS);
- assertThat(decorator.shouldExecuteOnProject(project)).isTrue();
-
- when(project.getAnalysisType()).thenReturn(Project.AnalysisType.DYNAMIC);
- assertThat(decorator.shouldExecuteOnProject(project)).isTrue();
- }
-
- @Test
public void lineCoverage() {
DecoratorContext context = mockContext(50, 10);