1
我有一个具有自定义PMD规则的ruleset.xml文件。我如何在SonarQube 5.5中使用这个文件?如何在SonarQube 5.5中使用自定义PMD规则?
我有一个具有自定义PMD规则的ruleset.xml文件。我如何在SonarQube 5.5中使用这个文件?如何在SonarQube 5.5中使用自定义PMD规则?
看看这个话题(并回答):
RulesDefinitionXmlLoader.load(repository, new BufferedReader(newInputStreamReader(ruleset.xml)));
希望这有助于获得:SonarQube how to create Profile and import new rules to it
你可以简单地使用类RulesDefinitionXmlLoader通过这样的方法负载导入规则你去。
Ruleset.xml是否包含以下格式的PMD规则:http://pmd.sourceforge.net/pmd-4.3/howtomakearuleset.html? – isobretatel
是的。或者更像tihs:http://javadocs.sonarsource.org/4.3/apidocs/org/sonar/api/server/rule/RulesDefinitionXmlLoader.html 顶部的元素是强制性的。 – jonypera
您可以查看更多[here](http://stackoverflow.com/questions/36011846/sonarqube-does-not-show-imported-rules-in-quality-profile)。 – jonypera