我配置了maven-checkstyle-plugin(v2.5)和maven-eclipse-plugin(v2.8).
一切都按预期工作但我一介绍,
模块名称="SuppressWarningsHolder" 和/或 模块名称="SuppressWarningsFilter"
到我的checkstyle-config.xml,我开始在构建项目时遇到问题.
这是我得到的:
[ERROR] BUILD ERROR
1> [INFO] ------------------------------------------------------------------------
1> [INFO] Failed during checkstyle configuration
1>
1>EXEC : Embedded error : cannot initialize module TreeWalker - Unable to instantiate SuppressWarningsHolder
1> Unable to instantiate SuppressWarningsHolderCheck
Run Code Online (Sandbox Code Playgroud)
如果我删除SuppressWarningsHolderCheck,我会得到相同的SuppressWarningsFilter错误.
有任何想法吗?
谢谢
看来你有两个问题:
Checker,不能下TreeWalker.尽管文档存在,但文档并没有使这一部分非常明确.请注意,SuppressWarnings 持有人 确实在TreeWalker.如果你做这两件事,那么东西应该有希望开始工作.