-
Notifications
You must be signed in to change notification settings - Fork 61
Description
My team is attempting to utilize the palantir java formatter in conjunction with Gradle and Spotless. Executing ./gradlew spotlessApply
works great, and formats our files as expected.
Additionally, we've installed the palantir-java-format
IntelliJ plugin which auto-formats my Java files on save so that we don't need to manually execute spotlessApply
prior to every commit. The plugin executes the palantir formatter on save, however we've found that it doesn't organize imports or remove unused imports.
Checking the File | Settings | Tools | Actions on Save | Optimize imports
checkbox does appear to organize our imports, but it doesn't respect the palantir import structure, and seems to instead utilize IntelliJ's code style import config. This appears to be the opposite behavior from the Reformat code
checkbox which ignores the IntelliJ code style config, and forces the palantir formatter.