Skip to content

Instantly share code, notes, and snippets.

@finaldie
Created November 12, 2013 03:18
Show Gist options
  • Select an option

  • Save finaldie/7424908 to your computer and use it in GitHub Desktop.

Select an option

Save finaldie/7424908 to your computer and use it in GitHub Desktop.

Revisions

  1. finaldie created this gist Nov 12, 2013.
    46 changes: 46 additions & 0 deletions clang_format_google
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    ---
    # BasedOnStyle: Google
    AccessModifierOffset: -1
    ConstructorInitializerIndentWidth: 4
    AlignEscapedNewlinesLeft: true
    AlignTrailingComments: true
    AllowAllParametersOfDeclarationOnNextLine: true
    AllowShortIfStatementsOnASingleLine: true
    AllowShortLoopsOnASingleLine: true
    AlwaysBreakTemplateDeclarations: true
    AlwaysBreakBeforeMultilineStrings: true
    BreakBeforeBinaryOperators: false
    BreakBeforeTernaryOperators: true
    BreakConstructorInitializersBeforeComma: false
    BinPackParameters: true
    ColumnLimit: 80
    ConstructorInitializerAllOnOneLineOrOnePerLine: true
    DerivePointerBinding: true
    ExperimentalAutoDetectBinPacking: false
    IndentCaseLabels: true
    MaxEmptyLinesToKeep: 1
    NamespaceIndentation: None
    ObjCSpaceBeforeProtocolList: false
    PenaltyBreakBeforeFirstCallParameter: 1
    PenaltyBreakComment: 60
    PenaltyBreakString: 1000
    PenaltyBreakFirstLessLess: 120
    PenaltyExcessCharacter: 1000000
    PenaltyReturnTypeOnItsOwnLine: 200
    PointerBindsToType: true
    SpacesBeforeTrailingComments: 2
    Cpp11BracedListStyle: true
    Standard: Auto
    IndentWidth: 4
    TabWidth: 8
    UseTab: Never
    BreakBeforeBraces: Attach
    IndentFunctionDeclarationAfterType: true
    SpacesInParentheses: false
    SpacesInAngles: false
    SpaceInEmptyParentheses: false
    SpacesInCStyleCastParentheses: false
    SpaceAfterControlStatementKeyword: true
    SpaceBeforeAssignmentOperators: true
    ContinuationIndentWidth: 4
    ...