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

Run clang-format automatically on everything #77

Open
mithro opened this issue Jan 15, 2020 · 2 comments
Open

Run clang-format automatically on everything #77

mithro opened this issue Jan 15, 2020 · 2 comments
Assignees

Comments

@mithro
Copy link
Collaborator

mithro commented Jan 15, 2020

All code should have clang-format run on it. Travis should run clang-format and check that the format is correct.

@alainmarcel
Copy link
Contributor

This is not applicable here. Not at checkin time at least. Maybe as a compilation step part of the Makefile?
All the source code that we check in is template code, we do not check in the actual generated code.
clang-format does not know how to deal with meta/template code.

@hzeller
Copy link
Collaborator

hzeller commented Sep 8, 2021

While the templates won't work, we should clang-format at least the final include files that we install.

This will actually find some subtle missing IWYU issues, as it sorts the headers alphabetically and will expose things that have not been included before; I've previously spent some time to make it work, but seems to be broken again.

I'll take this one and look to run clang-format in cmake as postprocessing of the generated code.

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