Skip to content

Fix Maven spotlessApply aborting on first file with lints#2937

Merged
nedtwigg merged 2 commits into
diffplug:mainfrom
mirkoalicastro:fix/maven-apply-aggregate-lints
May 20, 2026
Merged

Fix Maven spotlessApply aborting on first file with lints#2937
nedtwigg merged 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.

@nedtwigg nedtwigg merged commit c1683f2 into diffplug:main May 20, 2026
20 checks passed
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.

2 participants