|
| 1 | +# ROS 2 clang-format configuration |
| 2 | +# Based on ROS 2 style guide |
| 3 | +--- |
| 4 | +Language: Cpp |
| 5 | +BasedOnStyle: Google |
| 6 | +AccessModifierOffset: -2 |
| 7 | +AlignAfterOpenBracket: AlwaysBreak |
| 8 | +AlignConsecutiveAssignments: false |
| 9 | +AlignConsecutiveDeclarations: false |
| 10 | +AlignEscapedNewlines: Left |
| 11 | +AlignOperands: true |
| 12 | +AlignTrailingComments: true |
| 13 | +AllowAllParametersOfDeclarationOnNextLine: true |
| 14 | +AllowShortBlocksOnASingleLine: false |
| 15 | +AllowShortCaseLabelsOnASingleLine: false |
| 16 | +AllowShortFunctionsOnASingleLine: None |
| 17 | +AllowShortIfStatementsOnASingleLine: false |
| 18 | +AllowShortLoopsOnASingleLine: false |
| 19 | +AlwaysBreakAfterDefinitionReturnType: None |
| 20 | +AlwaysBreakAfterReturnType: None |
| 21 | +AlwaysBreakBeforeMultilineStrings: false |
| 22 | +AlwaysBreakTemplateDeclarations: Yes |
| 23 | +BinPackArguments: false |
| 24 | +BinPackParameters: false |
| 25 | +BraceWrapping: |
| 26 | + AfterClass: false |
| 27 | + AfterControlStatement: false |
| 28 | + AfterEnum: false |
| 29 | + AfterFunction: false |
| 30 | + AfterNamespace: false |
| 31 | + AfterStruct: false |
| 32 | + AfterUnion: false |
| 33 | + AfterExternBlock: false |
| 34 | + BeforeCatch: false |
| 35 | + BeforeElse: false |
| 36 | + IndentBraces: false |
| 37 | + SplitEmptyFunction: true |
| 38 | + SplitEmptyRecord: true |
| 39 | + SplitEmptyNamespace: true |
| 40 | +BreakBeforeBinaryOperators: None |
| 41 | +BreakBeforeBraces: Custom |
| 42 | +BreakBeforeInheritanceComma: false |
| 43 | +BreakBeforeTernaryOperators: true |
| 44 | +BreakConstructorInitializersBeforeComma: false |
| 45 | +BreakConstructorInitializers: BeforeColon |
| 46 | +BreakStringLiterals: true |
| 47 | +ColumnLimit: 100 |
| 48 | +CompactNamespaces: false |
| 49 | +ConstructorInitializerAllOnOneLineOrOnePerLine: true |
| 50 | +ConstructorInitializerIndentWidth: 2 |
| 51 | +ContinuationIndentWidth: 2 |
| 52 | +Cpp11BracedListStyle: true |
| 53 | +DerivePointerAlignment: false |
| 54 | +FixNamespaceComments: true |
| 55 | +IncludeBlocks: Preserve |
| 56 | +IndentCaseLabels: true |
| 57 | +IndentPPDirectives: None |
| 58 | +IndentWidth: 2 |
| 59 | +IndentWrappedFunctionNames: false |
| 60 | +KeepEmptyLinesAtTheStartOfBlocks: false |
| 61 | +MaxEmptyLinesToKeep: 1 |
| 62 | +NamespaceIndentation: None |
| 63 | +PointerAlignment: Middle |
| 64 | +ReflowComments: true |
| 65 | +SortIncludes: true |
| 66 | +SortUsingDeclarations: true |
| 67 | +SpaceAfterCStyleCast: false |
| 68 | +SpaceAfterTemplateKeyword: true |
| 69 | +SpaceBeforeAssignmentOperators: true |
| 70 | +SpaceBeforeCpp11BracedList: false |
| 71 | +SpaceBeforeCtorInitializerColon: true |
| 72 | +SpaceBeforeInheritanceColon: true |
| 73 | +SpaceBeforeParens: ControlStatements |
| 74 | +SpaceBeforeRangeBasedForLoopColon: true |
| 75 | +SpaceInEmptyParentheses: false |
| 76 | +SpacesBeforeTrailingComments: 2 |
| 77 | +SpacesInAngles: false |
| 78 | +SpacesInContainerLiterals: false |
| 79 | +SpacesInCStyleCastParentheses: false |
| 80 | +SpacesInParentheses: false |
| 81 | +SpacesInSquareBrackets: false |
| 82 | +Standard: Cpp11 |
| 83 | +TabWidth: 2 |
| 84 | +UseTab: Never |
0 commit comments