From: toogley Date: Sat, 11 Feb 2017 10:11:33 +0000 (+0100) Subject: add clang-format file X-Git-Tag: neomutt-20170225~11^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=743adb7124d5f91fe7c13f7e4bb47dd6a89994aa;p=neomutt add clang-format file --- diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..d8ca87224 --- /dev/null +++ b/.clang-format @@ -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