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