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

Proposal: run clang-format and autopep8 on the existing code base; potentially add pre-commit hook for code style checking #1611

Open
nvzhihanj opened this issue Feb 6, 2024 · 3 comments · May be fixed by #1681 or #1682

Comments

@nvzhihanj
Copy link
Contributor

The current C++ code base follows C and fortran coding style, which is a bit stale given that C++14 is used. We would like to clang-format all the C++ code base and run autopep8 on all the python code base to adapt to the latest industry standards and modern C++ coding.

This can be done in v4.1.
@pgmpablo157321 FYI. I can help if needed.

@nvzhihanj
Copy link
Contributor Author

nvzhihanj commented Apr 2, 2024

As mentioned by Pablo, pre-commit hook is not necessarily installed by the developer. Automatically apply the format change in the PR automation is more reasonable.
Note: if automatic reformat is enabled, clang-format config needs to include SortIncludes: false so the functionality of the original code is not affected.

@mrmhodak
Copy link
Contributor

mrmhodak commented Apr 2, 2024

@pgmpablo157321 to handle

@psyhtest
Copy link
Contributor

psyhtest commented Apr 2, 2024

clang-format has many style options and even predefined options (LLVM, Google, Chromium, Mozilla, WebKit, Microsoft). Any thoughts on which one we should adopt?

As a recycled compiler person :), I'd vote for LLVM ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants