Which is the highest priority in PMD?

爷,独闯天下 提交于 2019-12-22 04:32:45

问题


Maybe it's just me, but I can't find information which is the highest priority in PMD: 1 or 5?

Because of http://pmd.sourceforge.net/running.html and the mention of the command line parameter -minimumpriority I think 5 is the highest and 1 is the lowest value. Am I right?


回答1:


Actually 1 is highest priority and 5 is lowest priority.
You can check the exported rule set, where

<rule ref="rulesets/imports.xml/ImportFromSamePackage"/> <!-- Default -->
<rule ref="rulesets/imports.xml/TooManyStaticImports">
   <priority>5</priority> <!-- Change to priority [information] -->
</rule>

The all default rule set configuration is in pmd-x.x.x.jar\rulesets\*.xml

Here you can see the rules priority and how they should be used.



来源:https://stackoverflow.com/questions/5498189/which-is-the-highest-priority-in-pmd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!