Skip to content

clang-format our code with Google-style

Dinyar Rabady requested to merge chore/clang-formatting into master

Hi,

This is my current least-effort proposal: I've generated a clang format file with clang-format --style=Google -dump-config > .clang-format and checked it in. I then used it to format our source files. I'm not hung up on Google-style, I chose it because Petr once mentioned it I think and because we wanted to follow also the Google coding standards.

The drawback of this MR is that it ruins git-blame for all previous changes. A way around this is to rewrite our history such as described in https://stackoverflow.com/a/58042990, but I don't know if it's worth the effort.

Let me know what you think.

(Also: If we merge this we should the introduce either pre- or (if possible) post-commit hooks to ensure that we stick the the format.

Merge request reports