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

More to Attach style brace formatting #77

Merged
merged 2 commits into from
Oct 12, 2017
Merged

More to Attach style brace formatting #77

merged 2 commits into from
Oct 12, 2017

Conversation

springmeyer
Copy link
Contributor

@springmeyer springmeyer commented Oct 10, 2017

The idea behind providing clang-format support in node-cpp-skel is not as much to enforce a single style but more to make it easy for downstream modules to be able to enforce a consistent style. However it became clear when forward porting dawg-cache (mapbox/dawg-cache#23 (comment)) that this style for braces is preferable, so I think we should update skel accordingly:

if (this) {
  ...
}

Rather than:

if (this)
{
 ...
}

/cc @apendleton @GretaCB @mapsam

@mapsam
Copy link
Contributor

mapsam commented Oct 11, 2017

Omg thank you so much 🙏

@apendleton
Copy link

Yeah to be clear, mostly I wanted the brace style in that specific repo to be consistent with other non-C++ geocoding projects since we move back and forth between JS and C++ projects a lot, and the other style is enforced via lints in our JS code. In general I think there's probably more value in people being able to easily move across projects in different languages within the same team than it is for people to be able to move across projects in the same language across different teams, if that makes sense (like, I'm never going to work on OSRM and I wouldn't expect them to work on carmen-cache, despite them both being written in C++), so I agree that it's not that important for there to be one Mapbox-wide style in C++, especially if there's not one in Javascript.

That said: certainly no objection if you folks prefer it this way as well.

@springmeyer springmeyer merged commit 4b7371a into master Oct 12, 2017
@springmeyer springmeyer deleted the format-braces branch October 12, 2017 16:44
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.

3 participants