@VisibleForTesting
static void extractRulesData(NewRepository repository, String xmlRulesFilePath,
String htmlDescriptionFolder) throws IOException {
final RulesDefinitionXmlLoader ruleLoader = new RulesDefinitionXmlLoader();
try (InputStream resource = CheckstyleRulesDefinition.class
.getResourceAsStream(xmlRulesFilePath)) {
ruleLoader.load(repository, resource, "UTF-8");
}
ExternalDescriptionLoader.loadHtmlDescriptions(repository, htmlDescriptionFolder);
try (InputStream resource = CheckstyleRulesDefinition.class
.getResourceAsStream("/org/sonar/l10n/checkstyle.properties")) {
loadNames(repository, resource);
}
SqaleXmlLoader.load(repository, "/com/sonar/sqale/checkstyle-model.xml");
}