Skip to content

Commit

Permalink
Add clang-format style file
Browse files Browse the repository at this point in the history
Based on Chromium's style guide.

Note: Different versions of clang-format will produce different results.
Please use clang-format 3.5 until further notice.
  • Loading branch information
andrewseidl committed Jul 29, 2015
1 parent 9fa325d commit deb298d
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# BasedOnStyle: Chromium
---
Language: Cpp
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: true
AlignAfterOpenBracket: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 100
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: true
Standard: Cpp11
IndentWidth: 2
TabWidth: 8
UseTab: Never
BreakBeforeBraces: Attach
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
...

1 change: 1 addition & 0 deletions QueryEngine/Execute.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// clang-format off
#include "Execute.h"

#include "Codec.h"
Expand Down
1 change: 1 addition & 0 deletions SqliteConnector/sqlite3.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// clang-format off
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
** version 3.8.7.2. By combining all the individual C code files into this
Expand Down
1 change: 1 addition & 0 deletions SqliteConnector/sqlite3.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// clang-format off
/*
** 2001 September 15
**
Expand Down
1 change: 1 addition & 0 deletions ThirdParty/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DisableFormat: true

0 comments on commit deb298d

Please sign in to comment.