Configure line-length for generated code #1969
jangalinski
started this conversation in
General
Replies: 1 comment 1 reply
-
This has been asked many times in the past: https://github.com/search?q=repo%3Asquare%2Fkotlinpoet+line+length&type=issues. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that when I use
listOf(codeblock,codeblock).joinToCode()
to avoid having newlines for each block (I use this by adding members to an annotaion spec), the generated single line is wrapped at a random whitespace.This still compiles, but looks ugly. Instead of working with the non-breaaking-dot hack for every format/value, can't I just configure kotlin poet that my max line length is set two 200 and avoid wrapping? I mean, I control the generated code, when I want a break, I can configure it.
Am I missing something? Can you help me out?
Beta Was this translation helpful? Give feedback.
All reactions