diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..369689ffb --- /dev/null +++ b/.clang-format @@ -0,0 +1,37 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +UseTab: Never +TabWidth: 4 +SpacesBeforeTrailingComments: 1 +ColumnLimit: 120 +BreakBeforeBraces: Allman +BraceWrapping: + AfterControlStatement: Always + AfterFunction: true + SplitEmptyRecord: false + BeforeElse: true + IndentBraces: true + AfterCaseLabel: true + AfterClass: true + AfterEnum: true + AfterStruct: true + AfterUnion: true + AfterExternBlock: true + BeforeCatch: true + BeforeLambdaBody: true + BeforeWhile: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +BreakBeforeTernaryOperators: true +PackConstructorInitializers: Never +ConstructorInitializerIndentWidth: 2 +CommentPragmas: NOLINT:.* +AllowShortFunctionsOnASingleLine: InlineOnly +Standard: Cpp11 +Cpp11BracedListStyle: true +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: Always +IndentAccessModifiers: false +AccessModifierOffset: -4 +SpaceBeforeParens: ControlStatementsExceptControlMacros +IndentCaseLabels: true diff --git a/share/valentina_code_style.xml b/share/valentina_code_style.xml index 7d866273c..2f2ee4411 100644 --- a/share/valentina_code_style.xml +++ b/share/valentina_code_style.xml @@ -1,16 +1,16 @@ - + CodeStyleData false false - true - false + false + true false - false + true true false true @@ -24,12 +24,13 @@ false false false - 4 + 2 true - true + false 2 + true true - 4 + 8