use of org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile in project sonarqube by SonarSource.
the class QualityProfileProvider method provide.
public ModuleQProfiles provide(ProjectKey projectKey, QualityProfileLoader loader, ProjectRepositories projectRepositories, AnalysisProperties props) {
if (this.profiles == null) {
List<QualityProfile> profileList;
Profiler profiler = Profiler.create(LOG).startInfo(LOG_MSG);
if (!projectRepositories.exists()) {
profileList = loader.loadDefault(getSonarProfile(props));
} else {
profileList = loader.load(projectKey.get(), getSonarProfile(props));
}
profiler.stopInfo();
profiles = new ModuleQProfiles(profileList);
}
return profiles;
}
use of org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile in project sonarqube by SonarSource.
the class ActiveRulesProviderTest method mockProfiles.
private static ModuleQProfiles mockProfiles(String... keys) {
List<QualityProfile> profiles = new LinkedList<>();
for (String k : keys) {
QualityProfile p = QualityProfile.newBuilder().setKey(k).setLanguage(k).build();
profiles.add(p);
}
return new ModuleQProfiles(profiles);
}
Aggregations