Eclipse plugin SONAR:自定义xpath规则为';在插件中不可用,但在MAVEN中可用?
我在sonar服务器上创建了一个新的xpath规则,并在质量概要文件中启用了它。 当我使用sonar:sonar开始maven构建时,将使用此规则并发现违规行为。 当我在Eclipse中启动本地分析时,没有使用该规则。 我在工作区中找到了pmd.xml。在bei maven(workspace…\target\sonar)使用的pmd.xml中,我看到了规则:Eclipse plugin SONAR:自定义xpath规则为';在插件中不可用,但在MAVEN中可用?,eclipse-plugin,sonarqube,rule,Eclipse Plugin,Sonarqube,Rule,我在sonar服务器上创建了一个新的xpath规则,并在质量概要文件中启用了它。 当我使用sonar:sonar开始maven构建时,将使用此规则并发现违规行为。 当我在Eclipse中启动本地分析时,没有使用该规则。 我在工作区中找到了pmd.xml。在bei maven(workspace…\target\sonar)使用的pmd.xml中,我看到了规则: <ruleset> <rule class="net.sourceforge.pmd.rules.XPathRul
<ruleset>
<rule class="net.sourceforge.pmd.rules.XPathRule" message="don't use hardcoded userid" name="XPathRule_1372166528">
<priority>2</priority>
<properties>
<property name="xpath">
<value><![CDATA[//PrimaryPrefix
[(Literal[((matches(@Image,'^"[A,E][A-Z][0-9]{5}"$')) .... ])
]]]></value>**
</property>
</properties>
</rule>
<rule ref="rulesets/strictexception.xml/AvoidRethrowingException">
<priority>3</priority>
</rule>
.........
</ruleset>
2.
**
3.
.........
在插件(workspace…\target\sonar embedder work)使用的pmd.xml中,我找不到此规则。有人知道为什么这样不行吗?我能做什么
多谢各位
Hedi您使用的是哪个版本的Sonar和Sonar Eclipse?