Compare commits

...

2 commits

Author SHA1 Message Date
Denis Kasak
68d83e43d7 Use proper enum value for Language directive. 2021-07-01 12:12:42 +02:00
Denis Kasak
d5d379fe2a Add preliminary .clang-format file.
Our current coding style is not very uniform and we don't seem to be
following any particular standard, even though there are some patterns
we more or less follow.

This attempts to mostly reproduce our current style. However, it still
introduces quite a lot of changes since clang-format doesn't yet support
dangling parentheses[*] (where the closing parenthesis of a parameter
list goes on its own line).

[*]: https://reviews.llvm.org/D33029
2021-06-30 16:45:37 +02:00
2 changed files with 25 additions and 0 deletions

11
.clang-format Normal file
View file

@ -0,0 +1,11 @@
---
BasedOnStyle: WebKit
IndentWidth: 4
ColumnLimit: 80
---
Language: Cpp
PointerAlignment: Middle
IndentCaseLabels: true
BinPackArguments: true
SpaceAfterCStyleCast: true
---

14
.editorconfig Normal file
View file

@ -0,0 +1,14 @@
root = true
[*]
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
[*.{c,cpp,h,hh,py,ts,js,java,m}]
indent_style = space
indent_size = 4
[Makefile]
indent_style = tab