This is an old revision of the document!
Code style
To gradually improve the code style in diana, we ask to format all changesets using clang-format (4.0) with these style options:
- .clang-format
- --- BasedOnStyle: LLVM Language: Cpp PointerAlignment: Left ColumnLimit: 160 BreakBeforeBraces: Custom BraceWrapping: AfterClass: true AfterFunction: true AfterStruct: true AfterUnion: true BreakConstructorInitializersBeforeComma: true ... 
This style configuration should be saved in the diana top-level source-directory as .clang-format.
We suggest using git-clang-format to reformat modified lines:
- save git-clang-format in yourPATHand make it executable
- ifclang-formatis not version 4.0, it might necessary to configure git withgit config clangFormat.binary clang-format-4.0 
- preview reformatted modifications withgit clang-format --diff 
- reformat modifications withgit clang-format -f