From 1e90d78f99cab5dea29af87e2f2d26880a71eae4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 11 May 2016 10:30:56 -0400 Subject: [PATCH] Configure clang-format for CMake source tree After discussion among developers we settled on the Mozilla style with a few tweaks: * Do not align operator arguments. * Do not always break after a function return type. * Limit to 79 columns instead of 80 to fit edge cases better in 80-column terminals as CMake has always done. * Format for C++98 instead of C++11 because CMake is written in the former language. Co-Author: Daniel Pfeifer --- .clang-format | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..a8bde417d --- /dev/null +++ b/.clang-format @@ -0,0 +1,9 @@ +--- +# This configuration requires clang-format 3.8 or higher. +BasedOnStyle: Mozilla +AlignOperands: false +AlwaysBreakAfterReturnType: None +AlwaysBreakAfterDefinitionReturnType: None +ColumnLimit: 79 +Standard: Cpp03 +...