本文整理匯總了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.");
}