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

Problem: inconsistent formatting #2908

Merged
merged 7 commits into from
Feb 8, 2018
Merged

Problem: inconsistent formatting #2908

merged 7 commits into from
Feb 8, 2018

Conversation

sigiesec
Copy link
Member

@sigiesec sigiesec commented Feb 2, 2018

Solution: defined formatting using .clang-format file, set up CI checks for correct formatting, and initially applied reformatting to all source files

Solution: applied clang-format
Solution: add clang-format to cmake, and add another travis-ci build type
Solution: restrict to src, tests, perf, tools and include directories
Solution: explicitly select clang-5.0
Solution: fix execution directory
Solution: fix CMAKE_MODULES_PATH
@c-rack
Copy link
Member

c-rack commented Feb 3, 2018

@sigiesec is this ready to merge or still subject to discussion?

@sigiesec
Copy link
Member Author

sigiesec commented Feb 3, 2018

It is ready to merge from my point of view. I discussed with @bluca and @jimklimov at the Hackathon. @bluca just wanted to wait if @somdoron has any objections/suggestions.

@sigiesec
Copy link
Member Author

sigiesec commented Feb 3, 2018

However, please do not merge any other PR before this, as this would most probably require modifying this PR, and indirectly all my others that are based on the changes in this.

@bluca
Copy link
Member

bluca commented Feb 4, 2018

@somdoron what do you think? Having the CI addition should help contributors. Also we can extend the PR template with a note.

If we go with this, I think it's better this way with the huge diff, biting the bullet in one go, rather than bit-by-bit. We can tag the repository with something like "pre_reformat" to make it easier to use git blame.

@bluca
Copy link
Member

bluca commented Feb 4, 2018

Oh **** I didn't notice the compiler snippets were touched by this as well. Sorry! Let's see if it can be fixed in a quick way by the gui

@bluca
Copy link
Member

bluca commented Feb 4, 2018

@sigiesec really sorry - I shouldn't do things when I'm really tired. Please feel free to use the same PR for the other commits as well, in a single branch, so that your life is easier - it doesn't make much difference anyway if they are in a single PR

@bluca
Copy link
Member

bluca commented Feb 4, 2018

@sigiesec thought of a way to fix it - I temporarily reverted the other PR, so that there are no merge conflicts here anymore. Phew!
I'll re-apply the other patch after we are done here.

@sigiesec
Copy link
Member Author

sigiesec commented Feb 5, 2018

Hi @bluca ok, temporarily reverting #2920 is what I would also have suggested, I think this has the least overall effort. Tagging the repo state before the reformatting is also a good idea.

@bluca
Copy link
Member

bluca commented Feb 6, 2018

@somdoron ping :-)

@sigiesec
Copy link
Member Author

sigiesec commented Feb 7, 2018

@bluca: somdoron appears not to be available :( so would you mind merging the PR now? It is difficult for me and any others working on some changes to go on with this pending.

@bluca
Copy link
Member

bluca commented Feb 7, 2018

I've tried to annoy him via email now - let's wait a couple more days first, then I'll merge, ok?

@somdoron
Copy link
Member

somdoron commented Feb 8, 2018

Sorry, missed it. Looks fine to me, hard to review so many files.

How we will prevent new PR from using wrong formatting?

@sigiesec
Copy link
Member Author

sigiesec commented Feb 8, 2018

Correct formatting is checked by a new travis job. Here you can see an example of output in case of a formatting failure: https://travis-ci.org/ZMQers/libzmq/jobs/336505439#L624
Output includes a patch that can be applied manually then.

@sigiesec
Copy link
Member Author

sigiesec commented Feb 8, 2018

@bluca So can you merge it now? Then it is also easier to give the other pending PRs a closer look.

@bluca bluca merged commit b77d761 into zeromq:master Feb 8, 2018
@bluca
Copy link
Member

bluca commented Feb 8, 2018

Done! I think the other branches will need rebasing now? Github adds a merge commit

@sigiesec
Copy link
Member Author

sigiesec commented Feb 8, 2018

Great, thanks!

Hm... Maybe ... I hoped that this would not be necessary as long as there are no conflicts, but it seems it does not rebase automatically. I will have a look at the other PRs tomorrow.

@sigiesec sigiesec deleted the clang-format branch February 8, 2018 18:20
@sigiesec
Copy link
Member Author

sigiesec commented Feb 8, 2018

@bluca I have now rebased all my PRs and also re-created #2920.

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

Successfully merging this pull request may close these issues.

4 participants