2016-09-28 34 views
1

我沒有看過我的Eclipse插件項目幾個星期,但我更新到霓虹燈後。 1,我注意到Problems視圖中出現以下錯誤:Eclipse插件項目「checkstyle內部錯誤」說「無法初始化模塊TreeWalker - 無法實例化... ...」ForbidCertainImportsCheck'「

由於內部錯誤,Checkstyle執行失敗。請查看錯誤日誌以獲取詳細信息。

在錯誤日誌中,我看到了這樣的事情:

消息的Checkstyle-插件:無法初始化模塊TreeWalker - 無法實例 「com.github.sevntu.checkstyle.checks.coding .ForBidCertainImportsCheck'類, 也不可能將其實例化爲com.puppycrawl.tools.checkstyle.checks.annotation.com.github.sevntu.checkstyle.checks.coding.ForbidCertainImportsCheck, com.puppycrawl.tools.checkstyle。 checks.blocks.com.github.sevntu.checkstyle.checks.coding.ForbidCertainImportsCheck, [刪除了很多simi lar class names], com.puppycrawl.tools.checkstyle.com.github.sevntu.checkstyle.checks.coding.ForbidCertainImportsCheckCheck。 請重新檢查將類名指定爲規範名稱,或閱讀如何配置名稱用法http://checkstyle.sourceforge.net/config.html#Packages的短名稱 。還請 重新檢查提供ClassLoader到Checker的配置是否正確。

當我在我的neon.1工作區中看到這個後,我還注意到我在Mars.2中運行的舊工作區也顯示了同樣的問題。

回答

1

我設法解決這個問題。

我工作的項目的父POM對checkstyle配置進行了更改,現在需要添加「seventu」輔助checkstyle插件,我在https://github.com/sevntu-checkstyle/sevntu.checkstyle處找到該插件。一旦我安裝了它(並執行了通常的「Maven Update Projects」調用),錯誤就消失了。