|
| 1 | +# This file can be used by the clang-format tool to |
| 2 | +# automatically format C++ source code. |
| 3 | +# See https://clang.llvm.org/docs/ClangFormat.html. |
| 4 | +# You can either run clang-format directly, or you can use |
| 5 | +# Integrated Development Environments (IDEs) that support clang-format, |
| 6 | +# such as: |
| 7 | +# - Visual Studio (https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/), |
| 8 | +# - CLion (https://www.jetbrains.com/help/clion/clangformat-as-alternative-formatter.html). |
| 9 | +# See the documentation for IDEs for more information. |
| 10 | +--- |
| 11 | +Language: Cpp |
| 12 | +# BasedOnStyle: LLVM |
| 13 | +AccessModifierOffset: -4 |
| 14 | +AlignAfterOpenBracket: DontAlign |
| 15 | +AlignConsecutiveAssignments: false |
| 16 | +AlignConsecutiveDeclarations: false |
| 17 | +AlignEscapedNewlines: Right |
| 18 | +AlignOperands: true |
| 19 | +AlignTrailingComments: true |
| 20 | +AllowAllParametersOfDeclarationOnNextLine: true |
| 21 | +AllowShortBlocksOnASingleLine: true |
| 22 | +AllowShortCaseLabelsOnASingleLine: true |
| 23 | +AllowShortFunctionsOnASingleLine: All |
| 24 | +AllowShortIfStatementsOnASingleLine: true |
| 25 | +AllowShortLoopsOnASingleLine: true |
| 26 | +AlwaysBreakAfterDefinitionReturnType: None |
| 27 | +AlwaysBreakAfterReturnType: None |
| 28 | +AlwaysBreakBeforeMultilineStrings: false |
| 29 | +# AlwaysBreakTemplateDeclarations: Yes |
| 30 | +BinPackArguments: true |
| 31 | +BinPackParameters: true |
| 32 | +BraceWrapping: |
| 33 | + AfterClass: false |
| 34 | + AfterControlStatement: false |
| 35 | + AfterEnum: false |
| 36 | + AfterFunction: false |
| 37 | + AfterNamespace: false |
| 38 | + AfterObjCDeclaration: false |
| 39 | + AfterStruct: false |
| 40 | + AfterUnion: false |
| 41 | + AfterExternBlock: false |
| 42 | + BeforeCatch: false |
| 43 | + BeforeElse: false |
| 44 | + IndentBraces: false |
| 45 | + SplitEmptyFunction: true |
| 46 | + SplitEmptyRecord: true |
| 47 | + SplitEmptyNamespace: true |
| 48 | +BreakBeforeBinaryOperators: None |
| 49 | +BreakBeforeBraces: Attach |
| 50 | +BreakBeforeInheritanceComma: false |
| 51 | +# BreakInheritanceList: BeforeColon |
| 52 | +BreakBeforeTernaryOperators: true |
| 53 | +BreakConstructorInitializersBeforeComma: false |
| 54 | +BreakConstructorInitializers: BeforeColon |
| 55 | +BreakAfterJavaFieldAnnotations: false |
| 56 | +BreakStringLiterals: true |
| 57 | +ColumnLimit: 80 |
| 58 | +CommentPragmas: '^ IWYU pragma:' |
| 59 | +CompactNamespaces: false |
| 60 | +ConstructorInitializerAllOnOneLineOrOnePerLine: false |
| 61 | +ConstructorInitializerIndentWidth: 8 |
| 62 | +ContinuationIndentWidth: 8 |
| 63 | +Cpp11BracedListStyle: true |
| 64 | +DerivePointerAlignment: false |
| 65 | +DisableFormat: false |
| 66 | +ExperimentalAutoDetectBinPacking: false |
| 67 | +FixNamespaceComments: true |
| 68 | +ForEachMacros: |
| 69 | + - foreach |
| 70 | + - Q_FOREACH |
| 71 | + - BOOST_FOREACH |
| 72 | +IncludeBlocks: Regroup |
| 73 | +IncludeCategories: |
| 74 | + - Regex: '^(<SimTKcommon/)' |
| 75 | + Priority: 2 |
| 76 | + - Regex: '^(<simbody/)' |
| 77 | + Priority: 3 |
| 78 | + - Regex: '^(<OpenSim/)' |
| 79 | + Priority: 4 |
| 80 | + - Regex: '.*' |
| 81 | + Priority: 1 |
| 82 | +IncludeIsMainRegex: '(Test)?$' |
| 83 | +IndentCaseLabels: false |
| 84 | +IndentPPDirectives: AfterHash |
| 85 | +IndentWidth: 4 |
| 86 | +IndentWrappedFunctionNames: false |
| 87 | +JavaScriptQuotes: Leave |
| 88 | +JavaScriptWrapImports: true |
| 89 | +KeepEmptyLinesAtTheStartOfBlocks: true |
| 90 | +MacroBlockBegin: '' |
| 91 | +MacroBlockEnd: '' |
| 92 | +MaxEmptyLinesToKeep: 1 |
| 93 | +NamespaceIndentation: None |
| 94 | +# ObjCBinPackProtocolList: Auto |
| 95 | +ObjCBlockIndentWidth: 2 |
| 96 | +ObjCSpaceAfterProperty: false |
| 97 | +ObjCSpaceBeforeProtocolList: true |
| 98 | +PenaltyBreakAssignment: 2 |
| 99 | +PenaltyBreakBeforeFirstCallParameter: 19 |
| 100 | +PenaltyBreakComment: 300 |
| 101 | +PenaltyBreakFirstLessLess: 120 |
| 102 | +PenaltyBreakString: 1000 |
| 103 | +# PenaltyBreakTemplateDeclaration: 10 |
| 104 | +PenaltyExcessCharacter: 1000000 |
| 105 | +PenaltyReturnTypeOnItsOwnLine: 60 |
| 106 | +PointerAlignment: Left |
| 107 | +ReflowComments: true |
| 108 | +SortIncludes: true |
| 109 | +SortUsingDeclarations: true |
| 110 | +SpaceAfterCStyleCast: false |
| 111 | +SpaceAfterTemplateKeyword: true |
| 112 | +SpaceBeforeAssignmentOperators: true |
| 113 | +# SpaceBeforeCpp11BracedList: false |
| 114 | +# SpaceBeforeCtorInitializerColon: true |
| 115 | +# SpaceBeforeInheritanceColon: true |
| 116 | +SpaceBeforeParens: ControlStatements |
| 117 | +# SpaceBeforeRangeBasedForLoopColon: true |
| 118 | +SpaceInEmptyParentheses: false |
| 119 | +SpacesBeforeTrailingComments: 1 |
| 120 | +SpacesInAngles: false |
| 121 | +SpacesInContainerLiterals: true |
| 122 | +SpacesInCStyleCastParentheses: false |
| 123 | +SpacesInParentheses: false |
| 124 | +SpacesInSquareBrackets: false |
| 125 | +Standard: Cpp11 |
| 126 | +TabWidth: 4 |
| 127 | +UseTab: Never |
| 128 | +... |
| 129 | + |
0 commit comments