Closed eyalroz closed 2 years ago
It is better to provide a "complete" .clang-format file to avoid incompatibility of clang-format versions.
The complete format settings can be generated as following:
clang-format --style=file --dump-config > .clang-format.all
The current ".clang-format" relies on the default settings of clang-format version:
---
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: 0
...
As a result, after I've cloned the source code and reformat it in my own IDE (VSCode) with different clang-format version installed, the source code is reformatted with huge difference. I cannot find a correct .clang-format file to exactly match the original file format settings because the inherited clang-format settings (BasedOnStyle: LLVM) is unknown (version dependent).
That's probably because I never formatted the whole thing.
For people working on this repository, it would be nice to have a clang-format file, or some other format, which defines indentation and format so that we don't mess them up.