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