IntelliJ (via Settings -> Editor -> Code Style -> Formatter) supports temporarily disabling/enabling code formatting with markers, the default being @formatter:off and @formatter:on. We were evaluating replacing Spotless w/ palantir-java-format, but we have numerous code blocks which we disable code formatting. Spotless respected the default IntelliJ format markers, but PJF does not appear to do so and formats the code anyways.
What happened?
IntelliJ (via Settings -> Editor -> Code Style -> Formatter) supports temporarily disabling/enabling code formatting with markers, the default being
@formatter:off
and@formatter:on
. We were evaluating replacing Spotless w/ palantir-java-format, but we have numerous code blocks which we disable code formatting. Spotless respected the default IntelliJ format markers, but PJF does not appear to do so and formats the code anyways.E.g.
becomes...
What did you want to happen?
Standard IntelliJ format markers are respected.