diffplug / diffplug/spotless

Give option for detailed linting errors

オープン
#2,455 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Java
スター
5.6k
フォーク
559
平均マージ
1日 13時間
マージ済み PR(30日)
34

説明

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).

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。