From 5edd7804728e388df801bd0de580513385a53a7f Mon Sep 17 00:00:00 2001 From: Tarek Yasser Date: Mon, 1 Jul 2024 19:58:13 +0300 Subject: [PATCH] Add clang format end editorconfig files. --- .clang-format | 30 ++++++++++++++++++++++++++++++ .editorconfig | 17 +++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .clang-format create mode 100644 .editorconfig diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..7f2ac7bd231 --- /dev/null +++ b/.clang-format @@ -0,0 +1,30 @@ +--- +BasedOnStyle: GNU +AccessModifierOffset: -4 +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveAssignments: + PadOperators: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Allman +BreakBeforeTernaryOperators: false +BreakConstructorInitializers: AfterColon +BreakInheritanceList: AfterColon +ColumnLimit: 120 +Cpp11BracedListStyle: true +IndentCaseBlocks: true +IndentWidth: 4 +KeepEmptyLinesAtTheStartOfBlocks: false +PackConstructorInitializers: Never +PenaltyReturnTypeOnItsOwnLine: 1000000 +PointerAlignment: Left +QualifierAlignment: Right +SpaceBeforeParens: ControlStatements +Standard: Latest +TabWidth: 4 +AllowShortLambdasOnASingleLine: None +AllowShortFunctionsOnASingleLine: None diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..a0e4e9eac0d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +charset = utf-8 +trim_trailing_whitespace = true +end_of_line = lf +insert_final_newline = true + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + +[*.{c,h,cpp,hpp}] +indent_style = space +indent_size = 4