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

clang-format config? #414

Closed
rpavlik opened this issue May 20, 2019 · 3 comments
Closed

clang-format config? #414

rpavlik opened this issue May 20, 2019 · 3 comments
Labels

Comments

@rpavlik
Copy link
Contributor

rpavlik commented May 20, 2019

In working on the code, I tend to accidentally not follow the style guide because it's a little unique (mostly the "no spaces in if(condition), etc" item) If this style is still the desired one and important, would be great if someone could make a clang-format (or other formatter) config file that enforced it.

@whitequark
Copy link
Contributor

I generally agree, but I'm not sure how clang-format deals with partial reformats. As been discussed before, bulk formatting changes are a no-go, and if clang-format can only do one file at a time its usefulness seems limited here.

@rpavlik
Copy link
Contributor Author

rpavlik commented May 20, 2019

I tend to use git clang-format to just reformat the changes currently staged, for projects where I can't format the whole thing.

@whitequark
Copy link
Contributor

Whoa, I had no idea that existed. I'm completely in favor of having a .clang-format file then and suggesting its use in guidelines. I'm not sure when I will get around it, so if you feel like making one, go ahead please.

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