From 9e56a5d881a0a2c6e87261c423c0237fefcbbc7f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 18 May 2017 10:06:33 -0400 Subject: [PATCH] clang-format: add configuration and attributes --- .clang-format | 14 ++++++++++++++ .gitattributes | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..3f82e9f94 --- /dev/null +++ b/.clang-format @@ -0,0 +1,14 @@ +--- +# This configuration requires clang-format 3.8 or higher. +BasedOnStyle: Mozilla +AlignAfterOpenBracket: Align +AlignOperands: false +AlwaysBreakAfterReturnType: None +AlwaysBreakAfterDefinitionReturnType: None +BreakBeforeBraces: Allman +ColumnLimit: 100 +Standard: Cpp11 +# This requires clang-format 4.0 (at least). +#FixNamespaceComments: true +ReflowComments: false +... diff --git a/.gitattributes b/.gitattributes index 2414d1d40..271468382 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,11 @@ +# Attributes used for formatting. +[attr]our-c-style whitespace=tab-in-indent format.clang-format + +*.cxx our-c-style +*.h our-c-style +*.hxx our-c-style +*.cu our-c-style + data/* filter=lfs diff=lfs merge=lfs -text /**/data/* filter=lfs diff=lfs merge=lfs -text