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

Use code formatting tools #57

Closed
AntoineRondelet opened this issue Aug 20, 2019 · 2 comments
Closed

Use code formatting tools #57

AntoineRondelet opened this issue Aug 20, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@AntoineRondelet
Copy link
Contributor

AntoineRondelet commented Aug 20, 2019

There are a few inconsistencies in term of code style in the code base. I think it'd be great to remove these style-related discrepancies to keep a code base uniform (ideally, we should not be able to distinguish between the authors of 2 randomly selected files of the code base). Removing frictions related to code-style allows to focus fully on the "algorithmic part" (what really matters) for reviews.

Languages like Golang come with some tooling like GoFmt that runs on the code and formats it "the standard way". I quickly DuckDuckGoed "code formatter cpp" and it seems tools like this exist for cpp too. I haven't used any of them, but from my flash reading it seems that clang-format is a good candidate and is nicely configurable (see: http://clang.llvm.org/docs/ClangFormatStyleOptions.html). Maybe we can go for this one.

[EDIT:] I can see that we can base the clang-format config on some style-guides (like: https://google.github.io/styleguide/cppguide.html). This is exactly what I was looking for. Let's use such style guide here (I quite like Google's one actually) to avoid spending time defining ours and arguing about style issues.

@AntoineRondelet AntoineRondelet added the enhancement New feature or request label Aug 20, 2019
@AntoineRondelet
Copy link
Contributor Author

AntoineRondelet commented Aug 20, 2019

Maybe @dtebbs you know some other code formatters, or have a favorite one that we could use?

This was referenced Aug 21, 2019
@AntoineRondelet
Copy link
Contributor Author

Closing as the corresponding pull request has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant