diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..376910818 --- /dev/null +++ b/.clang-format @@ -0,0 +1,106 @@ +# please use clang-format version 8 or later + +Language: Cpp +Standard: Cpp11 +AccessModifierOffset: -8 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: true +#AllowAllArgumentsOnNextLine: false # requires clang-format 9 +#AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9 +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: false +#AllowShortLambdasOnASingleLine: Inline # requires clang-format 9 +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakStringLiterals: false # apparently unpredictable +ColumnLimit: 80 +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 8 +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +FixNamespaceComments: false +ForEachMacros: + - 'json_object_foreach' + - 'json_object_foreach_safe' + - 'json_array_foreach' +IncludeBlocks: Preserve +IndentCaseLabels: false +IndentPPDirectives: None +IndentWidth: 8 +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: true +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Auto # requires clang-format 7 +ObjCBlockIndentWidth: 8 +ObjCSpaceAfterProperty: true +ObjCSpaceBeforeProtocolList: true + +PenaltyBreakAssignment: 10 +PenaltyBreakBeforeFirstCallParameter: 30 +PenaltyBreakComment: 10 +PenaltyBreakFirstLessLess: 0 +PenaltyBreakString: 10 +PenaltyExcessCharacter: 100 +PenaltyReturnTypeOnItsOwnLine: 60 + +PointerAlignment: Right +ReflowComments: false +SortIncludes: false +SortUsingDeclarations: false +SpaceAfterCStyleCast: false +#SpaceAfterLogicalNot: false # requires clang-format 9 +SpaceAfterTemplateKeyword: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeCtorInitializerColon: true # requires clang-format 7 +SpaceBeforeInheritanceColon: true # requires clang-format 7 +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true # requires clang-format 7 +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +StatementMacros: # requires clang-format 8 + - 'Q_OBJECT' +TabWidth: 8 +#TypenameMacros: # requires clang-format 9 +# - 'DARRAY' +UseTab: ForContinuationAndIndentation diff --git a/deps/blake2/.clang-format b/deps/blake2/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/deps/blake2/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/deps/glad/.clang-format b/deps/glad/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/deps/glad/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/deps/jansson/.clang-format b/deps/jansson/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/deps/jansson/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/deps/json11/.clang-format b/deps/json11/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/deps/json11/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/deps/libcaption/.clang-format b/deps/libcaption/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/deps/libcaption/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/deps/lzma/.clang-format b/deps/lzma/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/deps/lzma/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/deps/w32-pthreads/.clang-format b/deps/w32-pthreads/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/deps/w32-pthreads/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/libobs/graphics/libnsgif/.clang-format b/libobs/graphics/libnsgif/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/libobs/graphics/libnsgif/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/decklink/linux/decklink-sdk/.clang-format b/plugins/decklink/linux/decklink-sdk/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/decklink/linux/decklink-sdk/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/decklink/mac/decklink-sdk/.clang-format b/plugins/decklink/mac/decklink-sdk/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/decklink/mac/decklink-sdk/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/obs-outputs/librtmp/.clang-format b/plugins/obs-outputs/librtmp/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/obs-outputs/librtmp/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/obs-qsv11/bits/.clang-format b/plugins/obs-qsv11/bits/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/obs-qsv11/bits/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/obs-qsv11/libmfx/.clang-format b/plugins/obs-qsv11/libmfx/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/obs-qsv11/libmfx/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/win-capture/d3d8-api/.clang-format b/plugins/win-capture/d3d8-api/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/win-capture/d3d8-api/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/win-ivcam/.clang-format b/plugins/win-ivcam/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/win-ivcam/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true diff --git a/plugins/win-mf/.clang-format b/plugins/win-mf/.clang-format new file mode 100644 index 000000000..6420a4688 --- /dev/null +++ b/plugins/win-mf/.clang-format @@ -0,0 +1,3 @@ +Language: Cpp +SortIncludes: false +DisableFormat: true