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

Add .clang-format to the project #1267

Open
ZehMatt opened this issue Jul 30, 2023 · 3 comments
Open

Add .clang-format to the project #1267

ZehMatt opened this issue Jul 30, 2023 · 3 comments

Comments

@ZehMatt
Copy link
Contributor

ZehMatt commented Jul 30, 2023

It would be really nice to have this, the format is quite mixed and would help contributors think less about the code style and focus more on the technical aspect. One example would be context.cpp and context.hpp, context.hpp has the tab size of 4 where context.cpp has the tab size of 2.

@JonathanSalwan
Copy link
Owner

Great idea. Can you make a PR for this one? :)

@ZehMatt
Copy link
Contributor Author

ZehMatt commented Aug 15, 2023

Great idea. Can you make a PR for this one? :)

Can do, can you name me a file which I should base the format configuration on? Also should I format the entire code base at once or just drop in the .clang-format file and let whoever touches the file do that at the end? Some people also care quite a bit about the commit history and tend to not clang-format every file all at once. Definitely a good change in the long term in my opinion.

@JonathanSalwan
Copy link
Owner

JonathanSalwan commented Aug 15, 2023

Can do, can you name me a file which I should base the format configuration on?

Let's try first with this file.

Also should I format the entire code base at once or just drop in the .clang-format file and let whoever touches the file do that at the end?

I think for a first step, we could try with a very light clang format. The problem is that I care more about readability than strict coding style :)

Maybe we can try to write a clang format that matches the previous file I linked and then see how it goes on the whole code base?

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

No branches or pull requests

2 participants