Skip to content

Commit bd6e931

Browse files
AntonLemCopilot
andauthored
Docs/add jharmonizer integration work (#2)
* docs: add Chronizer third-party CLI and Maven plugin section to README Agent-Logs-Url: https://github.com/AntonLem/palantir-java-format/sessions/0318bb9c-4bfd-4240-8f79-210241fb953c Co-authored-by: AntonLem <2189039+AntonLem@users.noreply.github.com> * docs: rename Chronizer to JHarmonizer with correct repo URL Agent-Logs-Url: https://github.com/AntonLem/palantir-java-format/sessions/83e582a9-11d5-4216-bf57-fcb6f0454a50 Co-authored-by: AntonLem <2189039+AntonLem@users.noreply.github.com> * docs: fix JHarmonizer disclaimer formatting and add tool description Agent-Logs-Url: https://github.com/AntonLem/palantir-java-format/sessions/eae918ee-76ac-48ad-9c16-f25fe041dbe5 Co-authored-by: AntonLem <2189039+AntonLem@users.noreply.github.com> * docs: improve JHarmonizer description with plain language and three-mode overview Agent-Logs-Url: https://github.com/AntonLem/palantir-java-format/sessions/1b63a56b-b721-4573-8dd8-19fe4738fac4 Co-authored-by: AntonLem <2189039+AntonLem@users.noreply.github.com> * docs: remove third-party label, disclaimer, and git hooks bullet from JHarmonizer section Agent-Logs-Url: https://github.com/AntonLem/palantir-java-format/sessions/0c55b41b-d4e0-4016-a4a5-55faee616749 Co-authored-by: AntonLem <2189039+AntonLem@users.noreply.github.com> * docs: fix "three modes" -> "two modes" after removing git hooks bullet Agent-Logs-Url: https://github.com/AntonLem/palantir-java-format/sessions/ab96fb6d-11bc-485d-96c0-1d3a4c6ed0bf Co-authored-by: AntonLem <2189039+AntonLem@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: AntonLem <2189039+AntonLem@users.noreply.github.com>
1 parent 6768c0f commit bd6e931

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ _A modern, lambda-friendly, 120 character Java formatter._
1414
- [IntelliJ plugin](https://plugins.jetbrains.com/plugin/13180-palantir-java-format)
1515
- [Gradle plugin](#palantir-java-format-gradle-plugin)
1616
- [Spotless](#spotless)
17+
- [JHarmonizer](#jharmonizer)
1718

1819
It is based on the excellent [google-java-format](https://github.com/google/google-java-format), and benefits from the work of all the [original authors](https://github.com/google/google-java-format/graphs/contributors). palantir-java-format is available under the same [Apache 2.0 License](./LICENSE).
1920

@@ -150,6 +151,22 @@ when formatting java code.
150151
- See [integration in Spotless Gradle plugin](https://github.com/diffplug/spotless/tree/main/plugin-gradle#palantir-java-format).
151152
- See [integration in Spotless Maven plugin](https://github.com/diffplug/spotless/tree/main/plugin-maven#palantir-java-format).
152153

154+
## JHarmonizer
155+
156+
[JHarmonizer](https://github.com/lemon-ant/JHarmonizer) sorts and formats Java source files. It reorders class members — fields, constructors, methods, nested types, and initializer blocks — according to configurable rules, then formats the result using `palantir-java-format`. Before reordering, JHarmonizer analyses the relationships between class members (for example, which fields are read by which initializers) to ensure the reordered source still compiles and behaves correctly.
157+
158+
JHarmonizer works in two modes:
159+
160+
- **Reorder and format** – automatically reorder and format sources during the build or from the command line.
161+
- **Check** – verify that sources are already correctly ordered and formatted; fail the build (or report all violations) if they are not. Useful for enforcing standards in CI.
162+
163+
It is available as:
164+
165+
- **CLI tool** – a standalone fat JAR for use outside of Maven; sort and format Java source files directly from the command line.
166+
- **Maven plugin** – a build-lifecycle plugin that binds reordering and checking goals to standard Maven phases (`process-sources`, `validate`, etc.).
167+
168+
See the [JHarmonizer repository](https://github.com/lemon-ant/JHarmonizer) for installation instructions and configuration options.
169+
153170
## IntelliJ plugin
154171

155172
A

0 commit comments

Comments
 (0)