rewrite icon indicating copy to clipboard operation
rewrite copied to clipboard

Support maximum line length / column limits formatting

Open blipper opened this issue 4 months ago • 2 comments

What problem are you trying to solve?

Many style guides such as Google's impost maximum column limits (https://google.github.io/styleguide/javaguide.html#s4.4-column-limit). There is tooling such as Checkstyle that enforces these limits. https://checkstyle.sourceforge.io/checks/sizes/linelength.html . Automated refactoring will fail often due to changes made that trigger checkstyle and other formatting checks.

Describe the solution you'd like

Update formatters to reformat lines to conform to the line length limit.

Examples for strings as here https://github.com/google/google-java-format/blob/098431221007a0fce1b0d213ded10948087332a4/core/src/main/java/com/google/googlejavaformat/java/StringWrapper.java#L123

Have you considered any alternatives or workarounds?

Additional context

Are you interested in contributing this feature to OpenRewrite?

blipper avatar Oct 11 '24 03:10 blipper