Skip to content

Give option for detailed linting errors #2455

Open
@sebastian-peter

Description

@sebastian-peter

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)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions