clang-format: add configuration and attributes

This commit is contained in:
Ben Boeckel 2017-05-18 10:06:33 -04:00
parent 57feb06e74
commit 9e56a5d881
2 changed files with 22 additions and 0 deletions

14
.clang-format Normal file

@ -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
...

8
.gitattributes vendored

@ -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