-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add AStyle or similiar formatter to repository #52
Comments
Do we not have consistent formatting right now? What is intended:
I prefer to not break any backwards compatibility without releasing a new major version, but let me know what you see/think, and I'm open on having consistent styling. |
Hi Adam, I mean things like spaces, bracket positioning, line-width etc... The things you mentioned are left untouched. My editor keeps somewhat shifting the formatting to my own settings and I have to keep adjusting this. Perhaps as a pre-commit hook or something. I generally use something like this (.astylerc)
|
Got it, yes I think this is a good idea |
For basic options, such as tabs vs spaces, newlines, tab size etc, I think EditorConfig could be used. The upside is that it works while you type (in any supported editor, at least) and not after you type (ctrl+s). For C++-specific options, such as pointer- or reference aligment, clang-format looks like a good choice. I don't know if the codebase can be formatted satisfactorily, however - ATM I'm experimenting with this. Edit: we could even run clang-format in CI after #50. |
Add AStyle or similiar to project
An idea to add a default styling "something, e.g. AStyle" to the project to keep formatting aligned?
The text was updated successfully, but these errors were encountered: