use of org.sonar.ce.task.projectanalysis.analysis.ScannerPlugin in project sonarqube by SonarSource.
the class IssueCreationDateCalculator method basePluginIsNew.
private boolean basePluginIsNew(ScannerPlugin scannerPlugin, long lastAnalysisDate) {
String basePluginKey = scannerPlugin.getBasePluginKey();
if (basePluginKey == null) {
return false;
}
ScannerPlugin basePlugin = analysisMetadataHolder.getScannerPluginsByKey().get(basePluginKey);
return lastAnalysisDate < basePlugin.getUpdatedAt();
}
use of org.sonar.ce.task.projectanalysis.analysis.ScannerPlugin in project sonarqube by SonarSource.
the class LoadReportAnalysisMetadataHolderStep method loadQualityProfiles.
private void loadQualityProfiles(ScannerReport.Metadata reportMetadata) {
analysisMetadata.setQProfilesByLanguage(reportMetadata.getQprofilesPerLanguageMap().values().stream().collect(toMap(QProfile::getLanguage, qp -> new QualityProfile(qp.getKey(), qp.getName(), qp.getLanguage(), new Date(qp.getRulesUpdatedAt())))));
analysisMetadata.setScannerPluginsByKey(reportMetadata.getPluginsByKeyMap().values().stream().collect(toMap(Plugin::getKey, p -> new ScannerPlugin(p.getKey(), getBasePluginKey(p), p.getUpdatedAt()))));
}
Aggregations