Can `gradle tidy` reflow text properly when it inserts newlines?
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
### Description
I'm working on #13519, and ran `gradle tidy` to ... tidy things up, and it does this:
```
// verifies it's fine to change your mind on the number of bits quantization you want for the same
// field
// in the same index by changing up the Codec. This is allowed because at merge time we
// requantize the
// vectors.
```
It's because my original line wrap was too long for its taste, which is fine. But, then it creates these widow lines with just one or two words. I can revisit and reflow to right column width, manually, but can we fix tidy to not do this? It would ideally not gleefully create widow lines like this!
Contributor guide
Research direction
Start by reproducing the reported formatting with `gradle tidy` using the long Java comment shown in the issue. Trace the tidy text reflow entry point and its existing tests, then verify that inserted newlines avoid one- or two-word widow lines while preserving the intended column width.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100