palantir / palantir/palantir-java-format
Reformat string literal concatenation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 907
- Forks
- 101
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 19
Description
At present, my IDE will take string literals and automatically break them across lines. An example might be
callMethod("some very very very long string");
which it will break to
callMethod("some very very"
+ " long string");
PJF may then reformat this code to
callMethod(
"some very very" + " very long string");
when I next save. Maybe the fix here is in PJF (you could make PJF do a good job with string literals), maybe it's in gradle-baseline (IDEA settings).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the IDE's line break followed by PJF formatting using the Java examples in the issue. Start by tracing the formatter's handling of concatenated string literals and compare the result with the IDE and gradle-baseline alternatives described. Done means the resulting formatting no longer undoes the intended multiline string-literal layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100