簡體   English   中英

Eclipse PMD:無法導入自定義規則集

[英]Eclipse PMD :Not able to import custom ruleset

我無法在eclipse中上傳pmd的自定義規則集。 我正在使用eclipse LUNA和eclipse-pmd 1.8插件。 我嘗試過使用eclipse pmd插件以及source forge的pmd插件。

我已經提到過不能在Eclipse鏈接中導入PMD規則集並完成建議的編輯但沒有運氣。

我也在eclipse插件文件夾中搜索了PMD jar。

我的ruleset.xml表示如下:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ruleset xmlns="pmd.sf.net/ruleset/1.0.0"; name="pmd_eclipse" xmlns:xsi="w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="pmd.sf.net/ruleset_xml_schema.xsd"; xsi:schemaLocation="pmd.sf.net/ruleset/1.0.0 pmd.sf.net/ruleset_xml_schema.xsd">;
    <description>PMD Plugin preferences rule set</description>
    <rule ref="rulesets/java/strings.xml/AppendCharacterWithChar">
        <priority>4</priority>
    </rule>

這可能是pmd插件版本的問題。 我在Eclipse 4的pmd插件PMD中遇到了這個問題。我的規則集是從帶有PMD for Eclipse 3插件的eclipse導出的。

我為Eclipse 3安裝了PMD插件。(從https://sourceforge.net/projects/pmd/files/pmd-eclipse/3.2.6/下載zip文件)

提取zip並復制功能和插件文件夾。 轉到您當地的eclipse安裝並將其粘貼到那里。在提示時進行合並。 重啟你的日蝕。

現在您應該能夠導入規則集。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM