今天在尝试使用 checkstyle 构建项目时遇到此错误。这适用于我办公室的其他人,但我不想再次重新安装 Eclipse。知道这个错误的实际含义吗?
Errors occurred during the build.
Errors running builder 'Checkstyle Builder' on project 'myproject'.
cannot initialize module TreeWalker - Unable to instantiate TabCharacter
cannot initialize module TreeWalker - Unable to instantiate TabCharacter
cannot initialize module TreeWalker - Unable to instantiate TabCharacter
cannot initialize module TreeWalker - Unable to instantiate TabCharacter
我收集到它与制表符有关,但与其他无关。
更新:Eclipse 版本为 3.5,Checkstyle 为 5.0.0.200906281855-final。
(Java是jdk 1.6.0_10)
最佳答案
如 this bug 中所述, Checkstyle 插件版本 5.0.0.200906281855:
Release notes of Checkstyle 5 state that some of the modules and checks we are using are not backwards compatible.
E.g. the moduleTabCharacter
does not occur in v5 any more (was replaced byFileTabCharacter
), hence can't work.
The checkFileLength
does not require a syntax tree, hence is not any longer under parentTreeWalker
.
这意味着您的问题可能与 Eclipse 配置中 Checkstyle 插件的自动更新有关。
关于java - Eclipse 中的 Checkstyle 错误 - 无法实例化 Tab 字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1212109/