Add docs for Maven IDE hook#2573
Merged
nedtwigg merged 1 commit intodiffplug:mainfrom Jul 24, 2025
BojanStipic:maven-ide-hook
Merged
Add docs for Maven IDE hook#2573nedtwigg merged 1 commit intodiffplug:mainfrom BojanStipic:maven-ide-hook
nedtwigg merged 1 commit intodiffplug:mainfrom
BojanStipic:maven-ide-hook
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds IDE integration documentation for the Maven plugin by creating a new IDE_HOOK.md file. The documentation explains how to integrate Spotless Maven plugin with IDEs using command-line arguments, filling a gap in documentation since similar documentation already exists for the Gradle plugin.
- Adds comprehensive documentation for Maven IDE hook functionality
- Documents command-line arguments and their usage patterns
- Explains status information and error handling for IDE integrations
| - if `stderr` starts with `IS DIRTY`, then the file was dirty, and `stdout` contains its full formatted contents | ||
| - in every other case, `stdout` will be empty / the file will be unchanged because there is nothing to change | ||
| - if `stderr` starts with `IS CLEAN`, then the file is already clean | ||
| - if `stderr` starts with `DID NOT CONVERGE`, then the formatter is misbehaving, and the rest of `stderr` has useful diagnostic info (e.g. `spotless:diagnose` for [padded cell](../PADDEDCELL.md)) |
There was a problem hiding this comment.
The reference to spotless:diagnose appears to be Gradle-specific syntax. For Maven, this should likely be mvn spotless:diagnose to be consistent with Maven command syntax.
Suggested change
| - if `stderr` starts with `DID NOT CONVERGE`, then the formatter is misbehaving, and the rest of `stderr` has useful diagnostic info (e.g. `spotless:diagnose` for [padded cell](../PADDEDCELL.md)) | |
| - if `stderr` starts with `DID NOT CONVERGE`, then the formatter is misbehaving, and the rest of `stderr` has useful diagnostic info (e.g. `mvn spotless:diagnose` for [padded cell](../PADDEDCELL.md)) |
Member
|
Thanks for bringing these docs up to reality! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gradle plugin has IDE_HOOK.md document which explains how to integrate Spotless into IDEs. The similar documentation is missing for the Maven plugin even though it has the same capabilities. This PR adds this missing documentation (copy-pasted and adjusted from the Gradle docs).