Clang-format support
In order to have the code formatting generalized, I would suggest adding .clang-format configuration file in the project and mention using of clang-format in the contribution guidelines.
More information here: https://clang.llvm.org/docs/ClangFormat.html
we are currently using cpplint for maintaining a standardized format. What would clang-format give us over cpplint? I'm not opposed to changing it but would like to understand the advantages.
- clang-format is a tool that every developer can run before to submit a pull-requests; some IDE, such as Visual Studio integrates with clang-format and run it automatically on-save, if the user enable such option.
- Also, at the moment you are bind to google syntax, cpplint is developed by Google to follow their coding conventions while clang-format can use multiple syntax-style templates (google, llvm, mozilla, chromium, webkit) and you can define your own, which is actually my preferred option.
- Since the file .clang-format is submitted in the repository, every contributor who clones your repository will download it and know the syntax settings you want to use as can align to such syntax, manually or automatically (as I wrote above).
I can't tell if it's worth for you doing that. Here I'm just listing some possible vantages.
Thank you @sineang01! This sounds like a reasonable set of advantages. If you're willing to open a PR to replace cpplint with clang-format, I'd be happy to review and merge it. Otherwise it might happen when I find the time to get to it.
@drodil I like this idea, would you be able to make a PR for it? Should be pretty easy, no?
Wow 2y later 😃 Not sure I have time any time soon but I'll keep it in mind!