eclipse - 在 Eclipse 中构建期间无法初始化模块 TreeWalker

标签 eclipse checkstyle

我正在 Eclipse Mars 中执行 Project-Clean... 并收到以下错误

   Errors occurred during the build.
     Errors running builder 'Checkstyle Builder' on project 'MyProject'.
        cannot initialize module TreeWalker - Unable to instantiate 
        'RedundantThrows' class, it is also not possible to instantiate it as 
        com.puppycrawl.tools.checkstyle.checks.annotation.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.blocks.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.design.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.header.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.imports.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.indentation.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.javadoc.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.metrics.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.modifier.RedundantThrows,
        com.puppycrawl.tools.checkstyle.checks.naming.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.regexp.RedundantThrows,
        com.puppycrawl.tools.checkstyle.checks.sizes.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.whitespace.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.filters.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.RedundantThrows. Please recheck that class name 
        is specified as canonical name or read how to configure short name usage 
        http://checkstyle.sourceforge.net/config.html#Packages. Please also recheck that 
        provided ClassLoader to Checker is configured correctly.

CheckStyle 插件版本是 6.11。
您能否帮我弄清楚可能导致此错误的原因。谢谢。

最佳答案

RedundantThrows 检查 has been removed来自 Checkstyle。只需删除 <module>从您的 checkstyle.xml 中为它输入。

关于eclipse - 在 Eclipse 中构建期间无法初始化模块 TreeWalker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38760228/

相关文章:

Eclipse 升级杀死了 PyDev

java - Eclipse 中如何调用另一个项目的类?

android - 我在哪里可以找到 Android 编码风格的 checkstyle 配置?

java - 使用现有插件定义 findbugs 检测器

findbugs - 轻松在 (Java) 静态代码分析工具中编写自定义规则

java - K&R 配置文件未包含在 Eclipse 上的内置配置文件中

eclipse - Eclipse 中的内存

Android 模拟器不在 Virtualbox Ubuntu 实例中启动

java - 用于拼写和 javadoc 验证的检查工具

eclipse - Checkstyle,没有针对 getter 和 setter 的 JavaDoc 仅适用于 getter