diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-01-17 13:22:28 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-17 13:34:06 -0800 |
commit | 3eb11a606d834f3bdf8d9e0937e5a8f8468822c4 (patch) | |
tree | 1a14290937a2440c63b9e471bb0a9e09ccb814a1 /host | |
parent | 7d0c8fbd6ca19e62fd5c1bba6d9656b5c88dfbc5 (diff) | |
download | uhd-3eb11a606d834f3bdf8d9e0937e5a8f8468822c4.tar.gz uhd-3eb11a606d834f3bdf8d9e0937e5a8f8468822c4.tar.bz2 uhd-3eb11a606d834f3bdf8d9e0937e5a8f8468822c4.zip |
formatting: Add modified clang-format for headers
Because our headers do not require C++11, they need a different syntax
(e.g., vector<vector<int> >, note the space between the >). Since some
editors automatically pick up a .clang-format from a parent dir, this
helps when editing headers.
Diffstat (limited to 'host')
-rw-r--r-- | host/include/.clang-format | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/host/include/.clang-format b/host/include/.clang-format new file mode 100644 index 000000000..c8aad70cc --- /dev/null +++ b/host/include/.clang-format @@ -0,0 +1,94 @@ +--- +Language: Cpp +AccessModifierOffset: -4 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: true +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: false +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Custom +BraceWrapping: + AfterClass: true + AfterControlStatement: false + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterStruct: true +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeComma +BreakStringLiterals: true +ColumnLimit: 90 +CompactNamespaces: true +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +ForEachMacros: + - foreach + - BOOST_FOREACH +IncludeBlocks: Merge +IncludeCategories: + - Regex: '^"' + Priority: 1 + - Regex: '^"(uhd)/' + Priority: 2 + - Regex: '^"(uhdlib)/' + Priority: 3 + - Regex: '^<(uhd)/' + Priority: 4 + - Regex: '^<(uhdlib)/' + Priority: 5 + - Regex: '^<(boost)/' + Priority: 98 + - Regex: '^<[a-z]*>$' + Priority: 99 + - Regex: '.*' + Priority: 10 + +IndentCaseLabels: true +IndentPPDirectives: AfterHash +IndentWidth: 4 +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: 2 +NamespaceIndentation: None +PenaltyBreakAssignment: 10 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Left +ReflowComments: true +SortIncludes: true +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp03 +TabWidth: 8 +UseTab: Never |