HMCL
HMCL copied to clipboard
优化 checkstyle 输出
概述 | Summary
checkstyle 任务出错时像 test 一样只显示出错位置,而不是像现在这样爆出一大堆 gradle internal 的任务执行失败异常的堆栈信息
原因 | Reason
很烦,很影响查找具体信息
详情 | Description
No response
#6692
#6692
我是想从根源上解决这个问题
我是想从根源上解决这个问题
那得问Glavo了
或许是偶发或者个人特有的问题?我这里checkstyle的输出挺正常的:
> Task :HMCLCore:checkstyleTest
[ant:checkstyle] [ERROR] D:\_workspace\mc\HMCL\HMCLCore\src\test\java\org\jackhuang\hmcl\util\ByteArrayTest.java:133:9: var not allowed unless assigning a new instance or casting [MatchXpath]
[ant:checkstyle] [ERROR] D:\_workspace\mc\HMCL\HMCLCore\src\test\java\org\jackhuang\hmcl\util\tree\ZipFileTreeTest.java:67:13: var not allowed unless assigning a new instance or casting [MatchXpath]
[ant:checkstyle] [ERROR] D:\_workspace\mc\HMCL\HMCLCore\src\test\java\org\jackhuang\hmcl\util\versioning\GameVersionNumberTest.java:204:9: var not allowed unless assigning a new instance or casting [MatchXpath]
[ant:checkstyle] [ERROR] D:\_workspace\mc\HMCL\HMCLCore\src\test\java\org\jackhuang\hmcl\util\versioning\GameVersionNumberTest.java:214:9: var not allowed unless assigning a new instance or casting [MatchXpath]
> Task :HMCLCore:checkstyleTest FAILED
13 actionable tasks: 1 executed, 12 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':HMCLCore:checkstyleTest' (registered by plugin 'org.gradle.checkstyle').
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
> Checkstyle rule violations were found. See the report at: file:///D:/_workspace/mc/HMCL/HMCLCore/build/reports/checkstyle/test.html
Checkstyle files with violations: 3
Checkstyle violations by severity: [error:4]
* Try:
> Run with --scan to get full insights from a Build Scan (powered by Develocity).
BUILD FAILED in 7s
21:40:57: 执行完成 'HMCLCore:checkstyleTest'。
或许是偶发或者个人特有的问题?我这里checkstyle的输出挺正常的:
本地你运行肯定没问题啊 是gh这边的工作流的问题 (应该是--stacktrace参数导致) 而Glavo又不想给这个参数删了