use of org.sonar.scanner.bootstrap.DroppedPropertyChecker in project sonarqube by SonarSource.
the class ProjectReactorBuilder method execute.
public ProjectReactor execute() {
Profiler profiler = Profiler.create(LOG).startInfo("Process project properties");
new DroppedPropertyChecker(analysisProps.properties(), DROPPED_PROPERTIES).checkDroppedProperties();
Map<String, Map<String, String>> propertiesByModuleIdPath = new HashMap<>();
extractPropertiesByModule(propertiesByModuleIdPath, "", "", analysisProps.properties());
ProjectDefinition rootProject = defineRootProject(propertiesByModuleIdPath.get(""), null);
rootProjectWorkDir = rootProject.getWorkDir();
defineChildren(rootProject, propertiesByModuleIdPath, "");
cleanAndCheckProjectDefinitions(rootProject);
// Since task properties are now empty we should add root module properties
analysisProps.properties().putAll(propertiesByModuleIdPath.get(""));
profiler.stopDebug();
return new ProjectReactor(rootProject);
}
use of org.sonar.scanner.bootstrap.DroppedPropertyChecker in project sonarqube by SonarSource.
the class DroppedPropertyCheckerTest method warn_log_if_settings_contains_any_dropped_property.
@Test
public void warn_log_if_settings_contains_any_dropped_property() {
new DroppedPropertyChecker(ImmutableMap.of(DROPPED_PROPERTY_1, SOME_VALUE), ImmutableMap.of(DROPPED_PROPERTY_1, DROPPED_PROPERTY_MSG_1)).checkDroppedProperties();
assertThat(logTester.logs(LoggerLevel.ERROR)).isEmpty();
assertThat(logTester.logs(LoggerLevel.WARN)).containsOnly("Property '" + DROPPED_PROPERTY_1 + "' is not supported any more. " + DROPPED_PROPERTY_MSG_1);
assertThat(logTester.logs(LoggerLevel.INFO)).isEmpty();
assertThat(logTester.logs(LoggerLevel.DEBUG)).isEmpty();
assertThat(logTester.logs(LoggerLevel.TRACE)).isEmpty();
}
use of org.sonar.scanner.bootstrap.DroppedPropertyChecker in project sonarqube by SonarSource.
the class DroppedPropertyCheckerTest method no_log_if_no_dropped_property.
@Test
public void no_log_if_no_dropped_property() {
new DroppedPropertyChecker(ImmutableMap.of(DROPPED_PROPERTY_1, SOME_VALUE), ImmutableMap.<String, String>of()).checkDroppedProperties();
assertThat(logTester.logs()).isEmpty();
}
use of org.sonar.scanner.bootstrap.DroppedPropertyChecker in project sonarqube by SonarSource.
the class DroppedPropertyCheckerTest method no_log_if_settings_does_not_contain_any_dropped_property.
@Test
public void no_log_if_settings_does_not_contain_any_dropped_property() {
new DroppedPropertyChecker(ImmutableMap.<String, String>of(), ImmutableMap.of(DROPPED_PROPERTY_1, DROPPED_PROPERTY_MSG_1)).checkDroppedProperties();
assertThat(logTester.logs()).isEmpty();
}
Aggregations