Replace Prettier with formatter-maven-plugin - #114
Merged
bertysentry merged 3 commits intoJul 24, 2026
Conversation
Format Java sources with net.revelc.code.formatter:formatter-maven-plugin 2.29.0, validated during the validate phase, as in Jawk and maven-skin-tools. The Eclipse profile is the shared MetricsHub profile with a few adjustments to preserve the effective prettier conventions: one-tab continuation indentation, closing parenthesis on its own line when wrapped, compact wrapping for invocation selectors and throws clauses, and leading ?/: in wrapped ternaries. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Migration-only reformatting produced by mvn formatter:format; no functional changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7690bd4b87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
) The repository mixed CRLF and LF text files, and formatter-maven-plugin's default lineEnding AUTO enforces the current platform's separator, so validation passed on Windows but failed on the Linux CI runners (and vice versa). Store all text files with LF via .gitattributes, renormalize the affected files, and set lineEnding=KEEP so validation accepts the checked-out line endings on every platform, as Prettier's endOfLine=auto did. Also refresh the license headers with license:update-file-header (copyright years and organization name). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #110
Changes
com.hubspot.maven.plugins:prettier-maven-pluginwithnet.revelc.code.formatter:formatter-maven-plugin2.29.0, with thevalidategoal bound to thevalidatephase, coveringsrc/main/javaandsrc/test/java(same configuration as Jawk and maven-skin-tools)..prettierrc.yaml.metricshub-eclipse-formatter.xml, based on the shared MetricsHub Eclipse profile, with a few adjustments to preserve the effective prettier conventions:continuation_indentation= 1 (one-tab indent for wrapped parameters/arguments);parentheses_positions_in_method_delcarationand_invocation=separate_lines_if_wrapped(closing parenthesis on its own line when wrapped);alignment_for_selector_in_method_invocation= 16 (keepString.format(together instead of splitting the selector);alignment_for_throws_clause_in_method_declaration= 16 (throws clause kept on one line, matching the constructor setting already in the shared profile);wrap_before_conditional_operator= true (leading?/:in wrapped ternaries).join_wrapped_lines=false, prettier's original wrapping is preserved almost everywhere.Verification
mvn validatefails on misformatted sources (tested by deliberately breaking a file).mvn formatter:formatformats both main and test sources.mvn verifypasses (JDK 17): 43 tests, 0 failures; checkstyle/pmd/spotbugs clean.🤖 Generated with Claude Code