palantir / palantir/palantir-java-format
Allow Inlined Annotations for Mocks
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 907
- Forks
- 101
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 19
Description
What happened?
@Mock(answer = Answers.RETURNS_DEEP_STUBS) private Job job;
gets reformatted as
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private Job job;
Which is not very space-efficient if you have a bunch of mocks
What did you want to happen?
I'd like the code to stay with the inlined annotation.
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 formatter behavior with the inline @Mock annotation and compare it with the requested output. Locate the formatting logic and its regression tests for annotations and variable declarations; done means an inline annotation remains on the same line without changing other formatting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100