diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..c5bb52e --- /dev/null +++ b/.clang-format @@ -0,0 +1,19 @@ +BasedOnStyle: WebKit +AlignAfterOpenBracket: Align +AlignArrayOfStructures: Left +AlignConsecutiveMacros: AcrossEmptyLines +AlignConsecutiveAssignments: Consecutive +AlignConsecutiveBitFields: AcrossEmptyLines +AlignConsecutiveDeclarations: Consecutive +AlignEscapedNewlines: Left +AlignTrailingComments: true +AlwaysBreakAfterReturnType: TopLevelDefinitions +BreakBeforeTernaryOperators: true +IndentCaseLabels: true +IndentCaseBlocks: true +IndentGotoLabels: false +IndentPPDirectives: AfterHash +IndentExternBlock: NoIndent +PointerAlignment: Right +SpaceAfterCStyleCast: true +SortIncludes: false diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..29d9ac0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,38 @@ +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +tab_width = 4 + +# Disabled for now since not all editors support setting a tab_width value different from indent_size +# Relevant VSCode extension issue: https://github.com/editorconfig/editorconfig-vscode/issues/190 +# [*.rc] +# indent_style = space +# indent_size = 4 +# tab_width = 4 + +# [Makefile.*] +# indent_style = space +# indent_size = 4 +# tab_width = 4 + +[*.manifest] +indent_style = space +indent_size = 2 + +[*.yml] +indent_style = space +indent_size = 2 + +[**/CMakeLists.txt] +indent_style = space +indent_size = 4 + +[*.cmake] +indent_style = space +indent_size = 4 + +[*.json] +indent_style = space +indent_size = 4