
Baeldung · 9 min read
Guide to Palantir Code Formatter
palantir-java-format is a Java formatter that raises the line limit to 120, uses four‑space indents, and keeps lambdas inline for compact code. The guide shows how to integrate it with Spotless in Gradle and Maven, configure IntelliJ, and explains the formatter’s algorithm and style rules.
- Use Spotless with palantir-java-format to enforce consistent formatting in CI
- Configure Gradle plugin: id 'com.palantir.java-format' to add formatter step
- Palantir keeps lambdas inline, reducing line count and indentation depth