aboutsummaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-08-06 17:03:05 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-08-06 17:07:43 +0100
commitf7ce70d139effc5553c4ed2fa604724413b9d9b2 (patch)
tree5a05620ed6a65cf999b4ea0f3976b803b44504c8 /.clang-format
parent932537776012c33dcdb6ae34dbb419f13717804d (diff)
downloadYAGE-f7ce70d139effc5553c4ed2fa604724413b9d9b2.tar.gz
YAGE-f7ce70d139effc5553c4ed2fa604724413b9d9b2.zip
Adding clang format with my style based on google
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format48
1 files changed, 23 insertions, 25 deletions
diff --git a/.clang-format b/.clang-format
index 83ab45c9..3bf5128c 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,23 +1,23 @@
---
Language: Cpp
-BasedOnStyle: LLVM
-AccessModifierOffset: -2
+BasedOnStyle: Google
+AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
-AlignEscapedNewlinesLeft: false
+AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: true
+AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: false
+AlwaysBreakBeforeMultilineStrings: true
+AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
@@ -40,7 +40,7 @@ BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
@@ -49,33 +49,31 @@ DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
+ - Regex: '^<.*\.h>'
+ Priority: 1
+ - Regex: '^<.*'
Priority: 2
- - Regex: '^(<|"(gtest|isl|json)/)'
- Priority: 3
- Regex: '.*'
- Priority: 1
-IncludeIsMainRegex: '$'
-IndentCaseLabels: false
-IndentWidth: 2
+ Priority: 3
+IncludeIsMainRegex: '([-_](test|unittest))?$'
+IndentCaseLabels: true
+IndentWidth: 4
IndentWrappedFunctionNames: false
-JavaScriptQuotes: Leave
-JavaScriptWrapImports: true
-KeepEmptyLinesAtTheStartOfBlocks: true
+KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
-ObjCBlockIndentWidth: 2
+ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
-ObjCSpaceBeforeProtocolList: true
-PenaltyBreakBeforeFirstCallParameter: 19
+ObjCSpaceBeforeProtocolList: false
+PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Right
+PenaltyReturnTypeOnItsOwnLine: 200
+PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
@@ -83,13 +81,13 @@ SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
-SpacesBeforeTrailingComments: 1
+SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
-Standard: Cpp14
+Standard: Auto
TabWidth: 4
UseTab: Never
...