2016-09-28 33 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”调用),错误就消失了。