palantir-java-format icon indicating copy to clipboard operation
palantir-java-format copied to clipboard

A modern, lambda-friendly, 120 character Java formatter.

Results 97 palantir-java-format issues
Sort by recently updated
recently updated
newest added

## What happened? Annotations on a record's fields are put on the same line as the field declaration (assuming there's room horizontally): ``` @Schema(description = "A request for a quote")...

I often wish that people would write something like: ```java /** Returns true if the argument should be optional when fully parsed. */ public static boolean optionalWhenFullyParsed(Argument argument) { return...

palantir-java-format doesn't match new tokens in JDK 21 ```java Step 'palantir-java-format' found problem in 'src/main/java/io/github/mosaicmc/mosaicapi/impl/event/SubscriberImpl.java': 27:85: error: did not generate token "(" com.palantir.javaformat.java.FormatterException: 27:85: error: did not generate token "("...

## What happened? Failed with using Spotless Maven plugin and palantir rule: ``` [INFO] --- spotless:2.39.0:apply (default-cli) @ X --- [ERROR] Step 'palantir-java-format' found problem in 'X.java': 253:44: error: expected...

Failed with using Spotless Maven plugin and palantir rule: ``` Caused by: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()' at com.palantir.javaformat.java.RemoveUnusedImports.getSimpleName (RemoveUnusedImports.java:245) at com.palantir.javaformat.java.RemoveUnusedImports.buildReplacements (RemoveUnusedImports.java:225) at com.palantir.javaformat.java.RemoveUnusedImports.removeUnusedImports (RemoveUnusedImports.java:209) at com.diffplug.spotless.glue.pjf.PalantirJavaFormatFormatterFunc.apply (PalantirJavaFormatFormatterFunc.java:42) at com.diffplug.spotless.FormatterFunc.apply (FormatterFunc.java:32)...

Often, especially in test code, code gets cluttered with unused `throws` decerations which have their historical reason but where forgotten to remove. As the the current formatting rule are able...

## What happened? idea plugin won't format javadoc. e.g. a single line javadoc for a field description is way more than 120 long. On format, it formats all the java...

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...

GOOGLE is good that is has 2 spaces (but 100 max length), PALANTIR is good that it has 120 length (but 4 spaces) - why not add 120 length with...

## What happened? When trying to run programatically palantir java formatter: ```java var formatter = com.palantir.javaformat.java.Formatter.create(); formatter.formatSourceAndFixImports(source); ``` Throw the following exception ```log java.lang.IllegalAccessError: class com.palantir.javaformat.java.ImportOrderer (in unnamed module @0x544fe44c)...