use of org.sonar.api.batch.bootstrap.ProjectReactor 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.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method should_not_fail_with_dot_key.
@Test
public void should_not_fail_with_dot_key() {
ProjectReactor reactor = createProjectReactor("foo.bar");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method not_fail_with_alphanumeric_key.
@Test
public void not_fail_with_alphanumeric_key() {
ProjectReactor reactor = createProjectReactor("Foobar2");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method fail_with_invalid_key.
@Test
public void fail_with_invalid_key() {
ProjectReactor reactor = createProjectReactor("foo$bar");
thrown.expect(MessageException.class);
thrown.expectMessage("\"foo$bar\" is not a valid project or module key");
validator.validate(reactor);
}
use of org.sonar.api.batch.bootstrap.ProjectReactor in project sonarqube by SonarSource.
the class ProjectReactorValidatorTest method not_fail_with_colon_key.
@Test
public void not_fail_with_colon_key() {
ProjectReactor reactor = createProjectReactor("foo:bar");
validator.validate(reactor);
}
Aggregations