-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 #639
Add clang-format #639
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it'd be good to have a consistant style - here comes the bikeshedding as requested!
I like consistent style as well. A few comments (haven't look at the results yet):
|
On one project I worked on, there was a
That sounds very reasonable. My only concern is that not everything will be touched over time. But I suppose in that case we could start manually applying clang-format. I'll carve out some time to work on this. Turns out tuning clang-format rules is not a trivial task :) |
Otherwise clang-format will start bin packing these parameters.
Just force pushed. I believe I've addressed all the outstanding comments. Now this PR will gradually guide PRs to the final format. I did a full format of semantic_analyser.{h,cpp}: http://ix.io/255p . That file should be representative of the clang-format configuration. |
1eb8884
to
4218be1
Compare
Any clang-format errors will appear as a separate build job. The clang-format build job will also have a handy diff at the bottom.
This is what a format error looks like for the following change:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thank you! All the settings look good but if we see it trying to make strange changes we can always just ignore the clang-format CI job, so I'll merge it now and see how it goes!
This patch adds clang-format to the code base.
This is a pretty big patch. I played around with the settings for a while and this seemed like a somewhat sane configuration. That being said, I don't really care what the settings are. I'd just like the codebase to be consistent.
If anyone has any opinions, now would be the time to bikeshed.
This closes #182 .