misc: add format files for clang-format and editorconfig

This commit is contained in:
Alexandre Acebedo 2021-12-12 18:13:52 +01:00
parent ae5c7e0fc3
commit e83c4bd8c1
2 changed files with 34 additions and 0 deletions

17
.clang-format Normal file
View file

@ -0,0 +1,17 @@
---
BasedOnStyle: GNU
IndentWidth: 4
---
Language: Cpp
PointerAlignment: Right
ColumnLimit: 120
BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: false
AfterClass: false
SplitEmptyFunction: true
AfterFunction: true
AfterStruct: false
SpaceBeforeParens: ControlStatements
Cpp11BracedListStyle: true

17
.editorconfig Normal file
View file

@ -0,0 +1,17 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 4
max_line_length = 70
[{meson.build,PKGBUILD}]
indent_size = 2
[*.scd]
indent_style = tab
trim_trailing_whitespace = false