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

As someone reviewing code I don't want to be distracted by alternative styles for placing curly braces #4992

Closed
pdurbin opened this issue Aug 22, 2018 · 4 comments
Assignees

Comments

@pdurbin
Copy link
Member

pdurbin commented Aug 22, 2018

All of the developers at IQSS use Netbeans to edit Dataverse code and at http://guides.dataverse.org/en/4.9.2/developers/coding-style.html#format-code-you-changed-with-netbeans we kindly ask contributors to format the code they changed (not all the code in the file they touched) with Netbeans. That way, people doing code review are not distracted by differences of style and can focus on how the behavior of the code is changing.

In the spirit of small chunks, I'd like to update the dev guide to specifically address placement of curly braces. I don't know how to express this in Checkstyle (or even what it's called), but here are the settings Netbeans uses for braces:

screen shot 2018-08-22 at 11 58 13 am

@pameyer
Copy link
Contributor

pameyer commented Aug 22, 2018

This looks like what astyle calls "attached" or "java" braces (http://astyle.sourceforge.net/astyle.html#_style=java). Does that sound reasonable to folks?

@pdurbin
Copy link
Member Author

pdurbin commented Aug 22, 2018

@pameyer --style=java / --style=attach is quite close but can it be combined with --add-braces / -j which means "add braces to unbraced one line conditional statements"?

@pameyer
Copy link
Contributor

pameyer commented Aug 23, 2018

@pdurbin Probably, but I'll find out for sure.

@pdurbin
Copy link
Member Author

pdurbin commented Aug 23, 2018

@pameyer thanks for pull request #4995! I added a bit more and moved it to QA.

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

No branches or pull requests

4 participants