-
Notifications
You must be signed in to change notification settings - Fork 17
issue #25 - format libprio with clang-format, using Mozilla style #26
Conversation
beeaa69
to
e985342
Compare
Yeesh, finally got it to pass my own test :) There's a super minor difference (style for commented out code) between my local clang-format and the one on travis.. I bet it's just an older version of clang in the Ubuntu distro travis uses. In any case I think the important thing is consistency, and this particular difference seems pretty meaningless. |
Oh, so Travis compiles and runs |
Cool! If I run
... and many more. Is this what I should expect to see? Or is my |
@henrycg hm yeah mine is slightly different too... I suspect it's just that they are different versions of clang-format, I'll dig into it a bit before we merge as it'd be nice to be able to run locally and get more consistency than this... |
@henrycg just to double-check - did you pull this whole branch, or just the There's a My clang-format (and presumably the one on the Travis VM which is Ubuntu LTS I think by default) is much older than yours: |
OK so I took around online and apparently this is a pretty widespread problem (different I think the way to resolve is to just have a supported version, in the Ubuntu repos I see there are tons of versions available, presumably because of this problem. The latest on Homebrew is 4.0 so I'd suggest we go with that... going to see if I can force that on Travis. |
78f8dd1
to
ac33f15
Compare
46f720c
to
672f04b
Compare
@henrycg ok there we go... so. Travis only supports Trusty (the previous LTS before Bionic, still supported until next April), and the latest clang-format there is 3.9 Do you have a Personally I think staying compatible with the oldest still-supported LTS is a pretty decent target, but we could scuttle the whole automated-checking if you think it's too much of a burden. |
Yes, this works for me now. I'm able to get |
Great! I actually don't care that much about exactly what the code style is (for the most part), but I find having it be automated puts an end to unproductive debates :) |
This reformats existing source clang-format using Mozilla style, and adds a script to the Travis config which will print a diff in the build output with any new changes that do not match the style.