Skip to content
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

Support one-line property definitions #202

Closed
mkroening opened this issue Mar 20, 2019 · 3 comments
Closed

Support one-line property definitions #202

mkroening opened this issue Mar 20, 2019 · 3 comments
Labels

Comments

@mkroening
Copy link

Currently one-line property definitions are not supported:

@PropertyDefinition private String forename;

has to be changed to:

@PropertyDefinition
private String forename;

It would be great, if one-line property definitions would be supported, because that's the way google/google-java-format formats simple fields.

@jodastephen
Copy link
Member

The style guide does not mandate that, note the "may":

Annotations applying to a field also appear immediately after the documentation block, but in this case, multiple annotations (possibly parameterized) may be listed on the same line

I suspect that it would be quite tricky to write the code to achieve this, looking at how parseCodeIndex works, and the interactions with the various regexes used. If you want to raise a PR I'd probably accept it providing the changes do not greatly add to the complexity of the parser and there is no impact on the generated test case beans.

@jodastephen jodastephen added the RFE label Apr 1, 2019
@mkroening
Copy link
Author

All right. I just wanted to experiment with my current project and saw this problem occur.

To be honest, if it would be quite tricky to achieve this, it might not be worth it. But perhaps one day, I'll come back to this.

@jodastephen
Copy link
Member

Closing for now. Feel free to reopen in the future if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants