-
Notifications
You must be signed in to change notification settings - Fork 214
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
clang format #423
clang format #423
Conversation
The other piece is the variable/parameter naming. Half way through writing this plugin I was using the ROS naming convention and then thought about the possible of contributing back. Is there a way to easily go through and change variable and parameter names? |
eed26ff
to
5aac649
Compare
Is this the |
Yea, I also did not know if clang-tidy would do some of this instead of manually having to go through. |
clang-tidy can check and change variable name conventions: https://clang.llvm.org/extra/clang-tidy/checks/readability-identifier-naming.html#cmdoption-arg-memberprefix but I haven't found a |
If ros_qtc_plugin is added to the super-repo of Qt Creator as submodule, there would be no hard requirement to stick to Qt Creator coding style rules. |
Since integrating this into the Qt Creator upstream repo is not on the horizon, there is no real need to apply their code style. I am going to close this as the applied code style will clash anyway with the current state. The |
This adapts the code style to the one used by Qt Creator using clang-format with the style file from the upstream project: https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/.clang-format.
Since this PR touches every file, I would hold off the merge until we know that this style file is the correct one that we need to get the plugin merged upstream.
Edit: I added a script that applies the style to all source and header files. It has to be called from the source root. Note that different clang-format versions can result in different results. This is with clang-format 10.