我已经有几个星期没有查看我的Eclipse插件项目了,但是在我更新到Neon.1之后,我注意到问题视图中的以下错误:
由于内部错误,Checkstyle执行失败。详情请查看错误日志。
在错误日志中,我看到了这样的事情:
!MESSAGE Checksty-Plugin:无法初始化模块TreeWalker-无法实例化'com. github.savntu.checkstyle.checks.coding.ForbideSuperIMsCheck'类,也无法实例化它为com.puppycrawl.tools.checkstyle.checks.annotation.com.github.savntu.checkstyle.checks.coding.ForbideComumsCheck,com.puppycrawl.tools.checkstyle.checks.blocks.com.github.savntu.checkstyle.checks.coding.ForbideComumsCheck,[删除了许多类似的类名],com.puppycrawl.tools.checkstyle.com.github.savntu.checkstyle.checks.coding.ForbiDeComumsCheckCheck。请重新检查类名是否指定为规范名称或阅读如何配置短名称用法http://checkstyle.sourceforge.net/config.html#Packages.还请重新检查提供给Checker的ClassLoader是否配置正确。
在我的neon.1工作区中看到这个后,我还注意到我在Mars.2中运行的旧工作区也显示了同样的问题。
我已经设法解决了这个问题。
我工作的项目的父POM对其checkstyle配置进行了更改,现在需要添加我在https://github.com/sevntu-checkstyle/sevntu.checkstyle发现的“senentu”辅助checkstyle插件。一旦我安装了它(并执行了通常的“Maven Update Projects”调用),错误就消失了。