aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java19
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java27
2 files changed, 1 insertions, 45 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java
index 1ba17667560..aee2aab3d71 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java
@@ -57,8 +57,7 @@ public class ProjectConfigurator {
Date analysisDate = loadAnalysisDate();
project
.setAnalysisDate(analysisDate)
- .setAnalysisVersion(loadAnalysisVersion())
- .setAnalysisType(loadAnalysisType());
+ .setAnalysisVersion(loadAnalysisVersion());
return this;
}
@@ -78,22 +77,6 @@ public class ProjectConfigurator {
return date;
}
- private Project.AnalysisType loadAnalysisType() {
- String value = settings.getString(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY);
- if (value == null) {
- return Project.AnalysisType.DYNAMIC;
- }
-
- LOG.warn("'sonar.dynamicAnalysis' is deprecated since version 4.3 and should no longer be used.");
- if ("true".equals(value)) {
- return Project.AnalysisType.DYNAMIC;
- }
- if ("reuseReports".equals(value)) {
- return Project.AnalysisType.REUSE_REPORTS;
- }
- return Project.AnalysisType.STATIC;
- }
-
private String loadAnalysisVersion() {
return settings.getString(CoreProperties.PROJECT_VERSION_PROPERTY);
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java
index 6a30188454c..84b725007d8 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java
@@ -89,33 +89,6 @@ public class ProjectConfiguratorTest {
}
@Test
- public void explicit_dynamic_analysis() {
- Settings configuration = new Settings();
- configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "true");
- Project project = new Project("key");
- new ProjectConfigurator(configuration, system2).configure(project);
- assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.DYNAMIC);
- }
-
- @Test
- public void explicit_static_analysis() {
- Settings configuration = new Settings();
- configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "false");
- Project project = new Project("key");
- new ProjectConfigurator(configuration, system2).configure(project);
- assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.STATIC);
- }
-
- @Test
- public void explicit_dynamic_analysis_reusing_reports() {
- Settings configuration = new Settings();
- configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "reuseReports");
- Project project = new Project("key");
- new ProjectConfigurator(configuration, system2).configure(project);
- assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.REUSE_REPORTS);
- }
-
- @Test
public void is_dynamic_analysis() {
assertThat(Project.AnalysisType.DYNAMIC.isDynamic(false)).isTrue();
assertThat(Project.AnalysisType.DYNAMIC.isDynamic(true)).isTrue();