Search in sources :

Example 1 with InputModuleHierarchy

use of org.sonar.api.batch.fs.internal.InputModuleHierarchy in project sonarqube by SonarSource.

the class ProjectScanContainer method doAfterStart.

@Override
protected void doAfterStart() {
    DefaultAnalysisMode analysisMode = getComponentByType(DefaultAnalysisMode.class);
    InputModuleHierarchy tree = getComponentByType(InputModuleHierarchy.class);
    analysisMode.printMode();
    LOG.info("Project key: {}", tree.root().key());
    String organization = props.property("sonar.organization");
    if (StringUtils.isNotEmpty(organization)) {
        LOG.info("Organization key: {}", organization);
    }
    String branch = tree.root().definition().getBranch();
    if (branch != null) {
        LOG.info("Branch key: {}", branch);
    }
    LOG.debug("Start recursive analysis of project modules");
    scanRecursively(tree, tree.root());
    if (analysisMode.isMediumTest()) {
        getComponentByType(ScanTaskObservers.class).notifyEndOfScanTask();
    }
}
Also used : InputModuleHierarchy(org.sonar.api.batch.fs.internal.InputModuleHierarchy) ScanTaskObservers(org.sonar.scanner.mediumtest.ScanTaskObservers) DefaultAnalysisMode(org.sonar.scanner.analysis.DefaultAnalysisMode)

Aggregations

InputModuleHierarchy (org.sonar.api.batch.fs.internal.InputModuleHierarchy)1 DefaultAnalysisMode (org.sonar.scanner.analysis.DefaultAnalysisMode)1 ScanTaskObservers (org.sonar.scanner.mediumtest.ScanTaskObservers)1