subsurface/.clang-format
Dirk Hohndel c7e7cebed6 Small tweaks to our whitespace handling
This is still not (and likely will never be) intended to just be blindly
run and mechanically applied to all files. It tries to implement our rules
but it is not perfect and more importantly, we have parts of the code
where we intentionally break our rules for various reasons of readability
in that particular situation.

But running this against the sources files you touch often will point out
things that are wrong and should be fixed.

This fixes the indentation for continuation lines and the handling of the
for each style loops (clang 3.5 should have this built in - I'll play with
the current development version of this later).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-22 11:20:04 -07:00

22 lines
802 B
YAML

AlignEscapedNewlinesLeft: true
AccessModifierOffset: -8 # so public: and private: stays at the left site
AllowAllParametersOfDeclarationOnNextLine: false
BinPackParameters: true
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Linux
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ColumnLimit: 0
IndentFunctionDeclarationAfterType: false #personal taste, good for long methods
IndentWidth: 8
ContinuationIndentWidth: 8
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
SpaceBeforeAssignmentOperators: true
# doesn't work --> SpaceBeforeParens: ControlStatements
SpacesInParentheses: false
SpacesBeforeTrailingComments: 1
UseTab: Always
PointerBindsToType: false
# doesn't work, yet -> ForEachMacros: "Q_FOREACH"