Our current version of uncrustify (0.61) has several drawbacks:
* It doesn't handle C++11 constructs well (e.g., lambda functions, initializer lists).
* It has a myriad of options, but they are poorly documented.
* It's not available in the Ubuntu repos.
Therefore, I propose switching to clang-format-5.0, which doesn't share these problems. It is available
in Ubuntu 16.04, 17.10, 18.04 (and will be in 18.10).
I propose using the attached .clang-format file. For anyone interested in this issue, you can put the
file into the root directory of your repository and run
sudo apt install clang-format-5.0
clang-format-5.0 -i src/search/*.h src/search/*.cc # Modifies files in-place (be sure to backup first)
hg diff # or "hg meld"
to see the effects on a subset of the source files. The format options are documented at
https://releases.llvm.org/5.0.0/tools/clang/docs/ClangFormatStyleOptions.html .
|