Uh oh!
There was an error while loading. Please reload this page.
style: add Spotless formatter configuration - #189
Conversation
ppkarwasz
commented
Mar 14, 2025
Since this PR formats code, it will cause a lot of conflicts with other PRs. |
| public PackageURL( | ||
| final String type, | ||
| final String namespace, | ||
| final String name, | ||
| final String version, | ||
| final TreeMap<String, String> qualifiers, | ||
| final String subpath) |
There was a problem hiding this comment.
This change has something to do with the number of parameters? Maybe increase?
There was a problem hiding this comment.
The formatter limits the line to 120 characters and starts wrapping if it's more.
| */ | ||
| public MalformedPackageURLException() { | ||
| } | ||
| public MalformedPackageURLException() {} |
There was a problem hiding this comment.
I am against this change since braces are not supposed to be on a single line, empty or not.
There was a problem hiding this comment.
This is a choice in the palantir-java-format, not modifiable.
| throw new MalformedPackageURLException( | ||
| "The PackageURL " + component + " '" + value + "' contains invalid characters: " + invalidChars); |
There was a problem hiding this comment.
Maybe increase the line length? What is it currently?
There was a problem hiding this comment.
The line length chosen by the palantir-java-format is 120. Non-modifiable.
In general I like the fact that the formatter does not accept any parameters. At a previous job we spent 3 months deciding on all the hundreds of options of the Eclipse formatter and everybody hated the result anyway.
| private static void validateChars(String value, IntPredicate predicate, String component) | ||
| throws MalformedPackageURLException { |
There was a problem hiding this comment.
I assume this is a line length issue as well?
There was a problem hiding this comment.
Everything in fc1972e has been generated by running:
mvn spotless:apply
jeremylong
commented
Mar 19, 2025
@ppkarwasz due to how GH works, I can't figure out how to easily merge this without fixing the merge conflicts. While that sounds easy (revert the last commit, rebase or merge master, run spotlessApply), doing this on someone else's PR appears to be a bit more challenging. Mind updating this one? |
f155571 to
e30d6f3Comparee30d6f3 to
52b6dfcCompare52b6dfc to
1e444e4Compareppkarwasz
commented
Mar 19, 2025
@jeremylong, done! |
jeremylong
commented
Mar 19, 2025
Thanks! |
This PR adds a Spotless configuration that uses:
palantir-java-formatformatter for Java files.sort-pomformatter for the POM file.Review tips
This PR contains two commits:
Closes#183