Give option for detailed linting errors
- 主要语言
- Java
- 星标
- 5.6k
- 派生
- 559
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 43
描述
After upgrading to version 7, spotless just kept crashing when linting Scala in spotlessCheck/Apply, with a cryptic error message:
```
There were 411 lint error(s), they must be fixed or suppressed.
src/main/scala/edu/ie3/simona/actor/ActorUtil.scala:LINE_UNDEFINED scalafmt(java.lang.reflect.InvocationTargetException) java.lang.reflect.InvocationTargetException (...)
[...]
```
([CI run here](https://github.com/ie3-institute/simona/actions/runs/13314184819/job/37184042413?pr=1106))
Turns out the cause of our problem was that the scalafmt version was not set to the exact one required (3.8.1) in `.scalafmt.conf`. [It took me some time to figure this out](https://github.com/ie3-institute/simona/pull/1106#issuecomment-2748536248), so maybe there's a way to make the error logging more verbose. Giving an option to print the stack traces of linting errors would be great, for example (my apologies if this option exists already, I have not found it).
贡献指南
调研方向
使用链接的 CI 运行和 `.scalafmt.conf` 版本不匹配作为复现上下文。跟踪 Scala/Scalafmt lint 错误报告路径和现有配置选项;完成标准是用户可以选择为 lint 错误启用堆栈跟踪,而不改变默认输出。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, scala
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100