Skip to content

Fix Maven spotlessApply aborting on first file with lints#2937

Open
mirkoalicastro wants to merge 2 commits into
diffplug:mainfrom
mirkoalicastro:fix/maven-apply-aggregate-lints
Open

Fix Maven spotlessApply aborting on first file with lints#2937
mirkoalicastro wants to merge 2 commits into
diffplug:mainfrom
mirkoalicastro:fix/maven-apply-aggregate-lints

Conversation

@mirkoalicastro
Copy link
Copy Markdown
Contributor

In spotless:apply, the Mojo throws an exception on the first file that had unsuppressed lints. This made it exit the loop, so:

  • Remaining files were never formatted in that run
  • Only the first file's lints were reported, hiding the rest

This diverged from the Gradle plugin that processes all the files and reports an aggregated failure.

This PR aligns the behaviour of the Maven plugin with the Gradle one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant