From 933d44083e2f0787c46228ce03f924e8f4f84414 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 12 Feb 2014 22:30:03 -0800 Subject: Add a simplistic tool to clean up whitespace This hasn't been tested enought, but it seems to get really close. It assumes that clang-format is in your patch. Run perl scripys/whitespace.pl FILENAME and you'll get a diff of what it things is wrong with that file. If you like what you see, simply pipe the output into patch -p0 Signed-off-by: Dirk Hohndel --- .clang-format | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .clang-format (limited to '.clang-format') diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..6b75350e0 --- /dev/null +++ b/.clang-format @@ -0,0 +1,20 @@ +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 +MaxEmptyLinesToKeep: 2 +NamespaceIndentation: All +SpaceBeforeAssignmentOperators: true +# doesn't work --> SpaceBeforeParens: ControlStatements +SpacesInParentheses: false +SpacesBeforeTrailingComments: 1 +UseTab: Always +PointerBindsToType: false -- cgit v1.2.3-70-g09d2