From ec796bbdb31f1249f918f73c6420699ab55a75c3 Mon Sep 17 00:00:00 2001 From: Turanszki Janos Date: Wed, 4 Nov 2020 12:20:51 +0100 Subject: [PATCH] added clang-format --- .clang-format | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ WickedEngine.sln | 3 +++ 2 files changed, 69 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..06183b0c4 --- /dev/null +++ b/.clang-format @@ -0,0 +1,66 @@ +# The style used for all options not specifically set in the configuration. +BreakBeforeBraces: Allman + +# The extra indent or outdent of access modifiers, e.g. public:. +AccessModifierOffset: -4 + +# The column limit. A column limit of 0 means that there is no column limit. +ColumnLimit: 0 + +# The way to use tab characters in the resulting file. Possible values: Never, ForIndentation, Always. +UseTab: Never + +# The number of columns to use for indentation. +IndentWidth: 4 + +# The indentation used for namespaces. Possible values: None, Inner, All. +NamespaceIndentation: All + +# If true, always break after the template<...> of a template declaration. +AlwaysBreakTemplateDeclarations: false +BreakConstructorInitializersBeforeComma: true +ConstructorInitializerAllOnOneLineOrOnePerLine: true + +# Allows contracting simple braced statements to a single line. +AllowShortBlocksOnASingleLine: false + +# Dependent on the value, int f() { return 0; } can be put on a single line. Possible values: None, Inline, All. +AllowShortFunctionsOnASingleLine: None + +# If true, if (a) return; can be put on a single line. +AllowShortIfStatementsOnASingleLine: false + +# If true, while (true) continue; can be put on a single line. +AllowShortLoopsOnASingleLine: false + +# Pointer and reference alignment style. Possible values: Left, Right, Middle. +PointerAlignment: Left + +# If true, aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column. +AlignEscapedNewlinesLeft: true + +# If true, aligns trailing comments. +AlignTrailingComments: false + +# If true, a space may be inserted after C style casts. +SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true + +FixNamespaceComments: false + +# A vector of macros that should be interpreted as foreach loops instead of as function calls. +ForEachMacros: ['foreach', 'Q_FOREACH', 'BOOST_FOREACH'] + +IncludeBlocks: Preserve +IncludeIsMainRegex: '(Test)?$' + +# Indent case labels one level from the switch statement. +# When false, use the same indentation level as for the switch statement. +# Switch statement body is always indented one level more than case labels. +IndentCaseLabels: true +IndentPPDirectives: AfterHash diff --git a/WickedEngine.sln b/WickedEngine.sln index 5e6184d0f..29a9f856d 100644 --- a/WickedEngine.sln +++ b/WickedEngine.sln @@ -35,6 +35,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Shaders_HLSL6", "WickedEngi EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Supplementary", "Supplementary", "{BF8FCAB8-D7D3-4DAE-92DE-4B5037E9A0ED}" ProjectSection(SolutionItems) = preProject + .clang-format = .clang-format + .gitattributes = .gitattributes + .gitignore = .gitignore appveyor.yml = appveyor.yml .github\workflows\build-nightly.yml = .github\workflows\build-nightly.yml .github\workflows\build-pr.yml = .github\workflows\build-pr.yml