Skip to content

spotlessApply and spotlessCheck in the same build fails in 4.x #581

Closed
@andrej-urvantsev

Description

@andrej-urvantsev

I have this in my build.gradle.kts:

defaultTasks("spotlessApply", "build")

so I always run formatter before build. It worked up until version 4.0.0. Now plugin formats everything but fails at the end:

> Task :spotlessJavaCheck FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spotlessJavaCheck'.
> The following files had format violations:
      src/test/java/se/inoviagroup/v2t/gateway/AbstractSpringBootTest.java
          
  Run './gradlew :spotlessApply' to fix these violations.

If I run build again - it passes, since everything was formatted previously.

It worked on gradle 6.4.1 and spotless gradle plugin 3.30.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions