]> granicus.if.org Git - neomutt/commitdiff
add clang-format file
authortoogley <toogley@mailbox.org>
Sat, 11 Feb 2017 10:11:33 +0000 (11:11 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 20 Feb 2017 17:15:36 +0000 (17:15 +0000)
.clang-format [new file with mode: 0644]

diff --git a/.clang-format b/.clang-format
new file mode 100644 (file)
index 0000000..d8ca872
--- /dev/null
@@ -0,0 +1,63 @@
+Language: Cpp
+# BasedOnStyle
+
+TabWidth:          8
+UseTab:            Never
+IndentWidth:       2
+ColumnLimit:       80
+BreakBeforeBraces: Allman
+
+IncludeCategories:
+  - Regex:      '"config.h"'
+    Priority:   -1
+  - Regex:      '<.*>'
+    Priority:   1
+  - Regex:      '"mutt.h"'
+    Priority:   2
+  - Regex:      '"imap_private.h"'
+    Priority:   2
+  - Regex:      '".*"'
+    Priority:   3
+
+AlignAfterOpenBracket:            true
+AlignEscapedNewlinesLeft:         false
+AlignOperands:                    true
+AlwaysBreakAfterReturnType:       None
+BinPackArguments:                 true
+BinPackParameters:                true
+BreakBeforeBinaryOperators:       false
+BreakBeforeTernaryOperators:      false
+DerivePointerAlignment:           false
+IndentCaseLabels:                 true
+KeepEmptyLinesAtTheStartOfBlocks: false
+MaxEmptyLinesToKeep:              2
+PointerAlignment:                 Right
+ReflowComments:                   false
+SortIncludes:                     true
+SpaceAfterCStyleCast:             true
+SpaceBeforeAssignmentOperators:   true
+SpaceBeforeParens:                ControlStatements
+SpaceInEmptyParentheses:          false
+SpacesInCStyleCastParentheses:    false
+SpacesInParentheses:              false
+SpacesInSquareBrackets:           false
+IndentWrappedFunctionNames:       false
+
+# Allow some slightly over-long lines
+PenaltyExcessCharacter: 1
+
+# NEVER
+
+AllowShortFunctionsOnASingleLine:    false
+AllowShortBlocksOnASingleLine:       false
+AllowShortCaseLabelsOnASingleLine:   false
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine:        false
+
+# OPTIONAL
+
+AlignTrailingComments:             true
+AlignConsecutiveAssignments:       true
+# AlignConsecutiveDeclarations:      true
+# AlwaysBreakBeforeMultilineStrings: true
+# SpacesBeforeTrailingComments:      2