rulePluginRepository = new RulePluginRepositoryImpl(pluginConfigurationReader);
} catch (PluginRepositoryException e) {
throw new SonarException("Cannot read rules.", e);
}
List<Source> ruleSources = rulePluginRepository.getRuleSources();
RuleSetReader ruleSetReader = new RuleSetReaderImpl();
RuleSet ruleSet = ruleSetReader.read(ruleSources);
for (Concept concept : ruleSet.getConcepts().values()) {
rules.add(createRule(concept, RuleType.Concept));
}
for (Constraint constraint : ruleSet.getConstraints().values()) {
rules.add(createRule(constraint, RuleType.Constraint));