summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorAzat Khuzhin <a3at.mail@gmail.com>2016-10-05 14:00:55 +0300
committerAzat Khuzhin <a3at.mail@gmail.com>2016-10-05 15:47:46 +0300
commitf523cb7967bfc3f8d684218838bbcedbd5ea17d0 (patch)
tree2130376b230f7ada97420f61260f45ce622ff8c5 /.clang-format
parent807e2662f8dd0c39eff37d02c12b142c79ccd753 (diff)
downloadlibevent-f523cb7967bfc3f8d684218838bbcedbd5ea17d0.tar.gz
Add config for clang-format
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format63
1 files changed, 63 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..a9722db2
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,63 @@
+---
+Language: Cpp
+BasedOnStyle: LLVM
+
+AccessModifierOffset: -4
+
+AlignAfterOpenBracket: DontAlign
+AlignEscapedNewlinesLeft: true
+# AlignOperands: true
+AlignTrailingComments: true
+
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: All
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+
+AlwaysBreakAfterDefinitionReturnType: All
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: false
+
+# BinPackArguments: false
+# BinPackParameters: true
+
+BreakBeforeBinaryOperators: false
+BreakBeforeBraces: Custom
+BraceWrapping: { AfterFunction: true }
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializersBeforeComma: true
+
+ColumnLimit: 80
+
+ContinuationIndentWidth: 4
+
+DerivePointerAlignment: false #XXX
+DisableFormat: false
+ExperimentalAutoDetectBinPacking: false #XXX
+ForEachMacros: [ LIST_FOREACH, SIMPLEQ_FOREACH, CIRCLEQ_FOREACH, TAILQ_FOREACH, TAILQ_FOREACH_REVERSE, HT_FOREACH ]
+
+IndentCaseLabels: false
+IndentFunctionDeclarationAfterType: false
+IndentWidth: 4
+IndentWrappedFunctionNames: false
+
+KeepEmptyLinesAtTheStartOfBlocks: true
+MaxEmptyLinesToKeep: 2
+
+PointerAlignment: Right #XXX
+
+# SpaceAfterCStyleCast: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+Standard: Cpp03
+TabWidth: 4
+UseTab: Always
+SortIncludes: false
+...