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
RMG style #278
Comments
Establishing a coding convention is a good idea. I think the Eclipse defaults are generally fine. Some additional thoughts:
If we were sticking with Java, I'd also want everyone to learn how to use JUnit to write unit tests, but since we're probably switching to Py I'd say learn it in Python instead. Also, we should update the headers at the top of the source files when we clean up the formatting, e.g. to update the copyright date. |
The mixture of spaces and tabs was driving git crazy. In anticipation of ReactionMechanismGenerator#278 (comment) I have opted for soft tabs (4 spaces).
As we discussed in RMG meeting, it would be a good time to format the code once we come to the release stage.
Eclipse has a built-in formatter style named Java Conventions and if you don't have any objections, I plan to use it with modifications based on your suggestions. It has a mixed (both tabs and spaces) indentation, attached braces and 80 character line limit for code and comments. Let me know any of your preferences, if they differ from the default settings.
Currently, I plan to modify the default style by enabling:
Header comment formatting,
Never indent line comments,
Never indent block comments,
Off/On tags.
If you want to keep the original formatting for certain files, you can add //@Formatter:off line to the beginning of the code.
There is also a nice documentation on suggested Java conventions on Oracle web site for future reference. (http://www.oracle.com/technetwork/java/javase/documentation/codeconvtoc-136057.html)
The text was updated successfully, but these errors were encountered: