Skip to content

Annotation attributes are not being wrapped #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
OlgaMaciaszek opened this issue Feb 7, 2019 · 1 comment
Closed

Annotation attributes are not being wrapped #78

OlgaMaciaszek opened this issue Feb 7, 2019 · 1 comment
Milestone

Comments

@OlgaMaciaszek
Copy link

After running the formatter plugin, the following code (with new line after comma):

@SpringBootTest(classes = RibbonClientConfigurationIntegrationTests.TestLBConfig.class,
		properties = "test.ribbon.ServerListRefreshInterval=999")

will be converted to (with no new line):

@SpringBootTest(classes = RibbonClientConfigurationIntegrationTests.TestLBConfig.class, properties = "test.ribbon.ServerListRefreshInterval=999")

This is problematic, taken into account that we usually want to stick to a certain line length limit.

@philwebb
Copy link
Contributor

philwebb commented Feb 7, 2019

It looks like the underlying Eclipse formatter can wrap annotations so we probably just need to change an option in https://github.com/spring-io/spring-javaformat/blob/master/spring-javaformat/spring-javaformat-formatter/src/main/resources/io/spring/javaformat/formatter/formatter.prefs

screen shot 2019-02-07 at 10 30 53 am

@philwebb philwebb changed the title New lines between annotation arguments are being removed Annotation attributes are not being wrapped Mar 26, 2019
@philwebb philwebb added this to the 0.0.x milestone Mar 26, 2019
@philwebb philwebb modified the milestones: 0.0.x, 0.0.8 Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants