-
Notifications
You must be signed in to change notification settings - Fork 101
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
Define a quda code style (code formatting only) #254
Comments
I'm actually in favour of using a project-wide formatting solution rather than rely on developers to maintain this. Despite the fact that this will cause a global edit, I think the advantage of never having to worry about formatting again outweighs this disadvantage. Moreover, using a project-wide format solution will remove any accidental tab / space formatting differences for ever more. If we picked an appropriate moment to make this change, e.g., after most development branches are merged into develop, then this shouldn't be too disruptive. If we did go with such a solution we'd need to be careful that the Python generated dslash core files correspond to this standard and/or we remove the generated core files form the repository and simply generate them as part of the configure/make process. |
Note that there are style guidelines from the ISO C++ committee: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-naming However, they recommend snake_case everywhere, similar to the STL. As far as I can see this would require extensive renaming in QUDA. This also looks like a duplicate of #83. |
closing this as we have a |
I know there are some conventions but we lack documentation for them and profiles for code formatters.
It looks like we are pretty close to Google's C++ style (in terms of formatting), see:
http://google.github.io/styleguide/cppguide.html#Formatting
There is a profile for the formatter in eclipse (i.e. Nsight) and also artistic style has one (http://astyle.sourceforge.net/astyle.html#_style=google).
Nuno has put together a list of tools to be discussed in our calls, see:
https://github.com/lattice/quda/wiki/agenda-call-2015-05-07
So, my suggestion is we start with the Google C++ style for Eclipse (you can get it here: https://github.com/google/styleguide ) check in Eclipse/Nsight what modifications are necessary to reflect the current code (we might want to avoid automatically formatting existing code with the exception of white space changes to reduce merge conflicts). I have added an example screen shot.
Once we decided on that we can set up a wiki page with our conventions and configuration files for the formatting tools (say Eclipse, astyle, uncristify) ?
Any comments on this?
The text was updated successfully, but these errors were encountered: