palantir / palantir/palantir-java-format

How best to use with spotless and idea

Open
#835 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
907
Forks
101
Avg merge
1d 3h
Merged PRs (30d)
19

Description

What is the suggested way of integrating this with idea?

I have a build.gradle with spotless that calls palantirJavaFormat('2.28.0') which formats the code in a nice manor.

However when I organize imports using idea (ctrl+alt+o) the imports are moved back.

Is there a way to make idea and palantir agree on the format?

I have tried adding this to gradle plugins:
id "com.palantir.java-format-idea" version "2.28.0"
with no effect.

From the idea-marketplace I tried installing the palantir formating plugin, but when enabling it it did nothing.

So what is the best-practice of getting the palantir-format and idea to agree?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names build.gradle, Spotless, palantirJavaFormat, the Gradle plugin, and the IntelliJ IDEA marketplace plugin. Start by checking the existing integration documentation and plugin entry points to determine whether IDEA import organization can match the formatter. Done means documenting a supported best-practice configuration or clearly stating the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation, tooling
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.