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

Use a clang-format file? #69

Open
jdumas opened this issue Mar 1, 2023 · 2 comments
Open

Use a clang-format file? #69

jdumas opened this issue Mar 1, 2023 · 2 comments
Labels

Comments

@jdumas
Copy link
Contributor

jdumas commented Mar 1, 2023

A lot of files in geogram uses a mix of tabs and space for indentation, have trailing whitespaces, etc. This makes it hard to visualize the code when your indent setting in set differently from @BrunoLevy's (I use tab=4 space where I know Bruno likes to use tabs=8 spaces :p). See example screenshot below:

Screen Shot 2023-03-01 at 10 19 57 AM

Applying a clang-format file to the entire codebase is an easy way to get rid of these inconsistencies, at the cost of it destroying some "homemade" code indentation sometimes (but one can always disable clang-format locally by suing // clang-format off and // clang-format on around a block of code).

Or you could just run a script to convert tabs to space and remove trailing whitespaces, whichever solution works best for you!

@BrunoLevy
Copy link
Owner

OMG, I thought I had fixed that, but it comes back ...
... I think I'll run a script.

@jdumas
Copy link
Contributor Author

jdumas commented Mar 14, 2024

FWIW I found out a (Windows-only) tool called Clang-Format Detector that will automatically produce a .clang-format config option matching the input coding style.

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

No branches or pull requests

2 participants