【发布时间】:2020-05-13 08:01:38
【问题描述】:
我安装了 Checkstyle-Idea 插件,导入了 checkstyle 文件并使用下拉列表中的规则运行扫描。我遇到了以下例外:
Unexpected Exception Caught
The scan failed due to an exception: Exception was thrown while processing /dir/.../Test.java
Root cause:
'other' is different type of Path
java.lang.IllegalArgumentException: 'other' is different type of Path
at java.base/sun.nio.fs.UnixPath.relativize(UnixPath.java:429)
at java.base/sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
at com.puppycrawl.tools.checkstyle.utils.CommonUtil.relativizeAndNormalizePath(CommonUtil.java:382)
at com.puppycrawl.tools.checkstyle.Checker.acceptFileStarted(Checker.java:366)
at com.puppycrawl.tools.checkstyle.Checker.processFiles(Checker.java:283)
at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:216)
at org.infernus.idea.checkstyle.service.cmd.OpScan.processAndAudit(OpScan.j... (show balloon)
互联网上其他地方没有这个例外的踪迹,这很可怕。我使用的是 8.28 版本,但我尝试使用其他旧版本并遇到同样的问题。当我导入 checkstyle 文件时,它要求我在 checkstyle 文件中定义的 basedi 和抑制规则属性。我在两个字段中都输入了空字符串“”。
以前有人遇到过这种情况吗?
【问题讨论】:
-
项目路径中有符号链接吗?
-
抛出此异常的文件不是符号链接。
-
我会向插件开发人员报告一个错误。它可能特定于您的项目结构,因此Minimal, Complete, and Verifiable example 会有所帮助。
标签: java intellij-idea checkstyle intellij-plugin