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

Add a Google + left aligned pointer .clang-format #54

Merged
merged 1 commit into from May 6, 2018
Merged

Add a Google + left aligned pointer .clang-format #54

merged 1 commit into from May 6, 2018

Conversation

niklas88
Copy link
Member

@niklas88 niklas88 commented May 4, 2018

As discussed in a recent review we should follow a common code style. At
the chair we mostly use Google style and left aligned pointers so lets
stick with that. I tested reformatting everything but it's a huge change
and even breaks the build due to bad header dependencies (which we
should fix separately).

So the next plan is to reformat all new and significantly changed files
as well as fixing the headers. The first step of this is adding
a .clang-format file for automatic formatting.

Since the file is in the project root clang-format -i foo.cpp
automatically picks it up when executed within the project tree.

As discussed in a recent review we should follow a common code style. At
the chair we mostly use Google style and left aligned pointers so lets
stick with that. I tested reformatting everything but it's a huge change
and even breaks the build due to bad header dependencies (which we
should fix separately).

So the next plan is to reformat all new and significantly changed files
as well as fixing the headers. The first step of this is adding
a `.clang-format` file for automatic formatting.

Since the file is in the project root `clang-format -i foo.cpp`
automatically picks it up when executed within the project tree.
@niklas88 niklas88 mentioned this pull request May 4, 2018
Copy link
Member

@floriankramer floriankramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a .clang-style file and then requiring all future commits to use that file for styling is a good idea.
I would just change the style for all files though. The two errors that currently occur when doing that are a missing using std::string in ParseException.h and the reordering of the headers in QueryExecutionTree.h causing <bits/unordered_set.h> (which is apparently an internal header of the GNU ISO C++ Library?) to be included before <unordered_set>.

@floriankramer floriankramer merged commit 3685043 into ad-freiburg:master May 6, 2018
@niklas88 niklas88 deleted the add-clang-format branch October 31, 2018 09:35
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.

None yet

2 participants