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

Enforcing a consistent coding style for the project #1565

Open
G-D-Petrov opened this issue May 10, 2024 · 1 comment
Open

Enforcing a consistent coding style for the project #1565

G-D-Petrov opened this issue May 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@G-D-Petrov
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
At the moment, the coding style is inconsistent (especially in the C++ layer), we should agree to a style and make sure to stick to it with automated tools (e.g. automated linting in the editor, git hooks, CI tooling, etc.)

Describe the solution you'd like
This will be addressed in multiple stages:

  • Agree on a coding style for C++ (for Python we already use black and the style enforced by it)
  • Plan, run an automated tool and push changes for the new style
  • Add an automated way to make sure that the style is adhered to
@G-D-Petrov G-D-Petrov added the enhancement New feature or request label May 10, 2024
@G-D-Petrov
Copy link
Collaborator Author

As we discussed today, I made some quick research about the C++ styling.
I think that the closest style guide from the major ones is the Google one.
In general, .clang-format seems like a good way to enforce the whichever style we choose on any IDE (e.g. VSCode, Clion, etc) - I tested that both VSCode and CLion produce the same code style with the same .clang-format file on Windows and on WSL.
And there are GH actions that can be used to check the formatting in the code base.

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

No branches or pull requests

1 participant