2016-06-08 125 views

回答

0

看看这个话题(并回答):

RulesDefinitionXmlLoader.load(repository, new BufferedReader(newInputStreamReader(ruleset.xml))); 

希望这有助于获得:SonarQube how to create Profile and import new rules to it

你可以简单地使用类RulesDefinitionXmlLoader通过这样的方法负载导入规则你去。

+0

Ruleset.xml是否包含以下格式的PMD规则:http://pmd.sourceforge.net/pmd-4.3/howtomakearuleset.html? – isobretatel

+0

是的。或者更像tihs:http://javadocs.sonarsource.org/4.3/apidocs/org/sonar/api/server/rule/RulesDefinitionXmlLoader.html 顶部的元素是强制性的。 – jonypera

+0

您可以查看更多[here](http://stackoverflow.com/questions/36011846/sonarqube-does-not-show-imported-rules-in-quality-profile)。 – jonypera

相关问题