本文整理汇总了Java中org.sonar.squidbridge.rules.SqaleXmlLoader类的典型用法代码示例。如果您正苦于以下问题:Java SqaleXmlLoader类的具体用法?Java SqaleXmlLoader怎么用?Java SqaleXmlLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SqaleXmlLoader类属于org.sonar.squidbridge.rules包,在下文中一共展示了SqaleXmlLoader类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: extractRulesData
import org.sonar.squidbridge.rules.SqaleXmlLoader; //导入依赖的package包/类
@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")) {
PropertyFileLoader.loadNames(repository, resource);
}
SqaleXmlLoader.load(repository, "/com/sonar/sqale/checkstyle-model.xml");
}
示例2: define
import org.sonar.squidbridge.rules.SqaleXmlLoader; //导入依赖的package包/类
@Override
public void define(Context context) {
NewRepository repository = context
.createRepository(ColdFusionPlugin.REPOSITORY_KEY, ColdFusionPlugin.LANGUAGE_KEY)
.setName(ColdFusionPlugin.REPOSITORY_NAME);
rulesLoader.load(repository, new InputStreamReader(getClass().getResourceAsStream(DEFAULT_RULES_FILE), UTF_8));
SqaleXmlLoader.load(repository, DEFAULT_SQUALE_FILE);
repository.done();
}
示例3: define
import org.sonar.squidbridge.rules.SqaleXmlLoader; //导入依赖的package包/类
@Override
public void define(Context context) {
String languageKey = configuration.languageKey();
NewRepository repository = context
.createRepository(configuration.repositoryKey(), languageKey)
.setName(REPOSITORY_NAME);
rulesDefinitionXmlLoader.load(repository, getClass().getResourceAsStream("/org/sonar/plugins/resharper/rules.xml"), StandardCharsets.UTF_8.name());
SqaleXmlLoader.load(repository, "/org/sonar/plugins/resharper/sqale.xml");
repository.done();
LOG.info("ReSharper rules for " + languageKey + " imported.");
}