You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When having multiple parameters with ParameterSpec.builder(...).addJavadoc(...), the generated code does not add line breaks between the @param Javadoc tags. Instead they all appear in a single line:
We don't really want this library to be in the business of formatting code. There are too many different opinions and conventions regarding formatting - we can't provide a formatting output that satisfies everyone.
We will ensure that the generated code produces something reasonable. Personally, I think it's more natural/standard for there to not be newlines between parameters.
If you want a specific format, you can run the generated code through a formatter. This is actually what we do - we even have a library for this!
@pkoenig10, I think you misunderstood this. JavaPoet generates all @param tags on the same line. This is not about style, this is about correctness. JavaPoet is generating malformed Javadoc.
Version
0.5.0
0.6.0-SNAPSHOT 351beba
What happened?
When having multiple parameters with
ParameterSpec.builder(...).addJavadoc(...)
, the generated code does not add line breaks between the@param
Javadoc tags. Instead they all appear in a single line:Generated:
What did you want to happen?
Line breaks between
@param
tags:The text was updated successfully, but these errors were encountered: