0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00

Add code style configurations

This adds a clang-format with the new code style for OpenVPN 3.

A very light Emacs dir-locals configuration has also been added, but
that will most likely not cover all the formatting aspects which
clang-format does.  Running clang-format before committing is still
highly recommended to ensure the coding style is consistent.

Signed-off-by: David Sommerseth <davids@openvpn.net>
This commit is contained in:
David Sommerseth 2022-08-30 15:19:36 +02:00
parent 5b5d80fad3
commit 66527fa611
No known key found for this signature in database
GPG Key ID: 86CF944C9671FDF2
2 changed files with 16 additions and 0 deletions

6
.clang-format Normal file
View File

@ -0,0 +1,6 @@
BasedOnStyle: Microsoft
ColumnLimit: 0
SortIncludes: Never
BreakBeforeBinaryOperators: All
BinPackArguments: False
BinPackParameters: False

10
.dir-locals.el-example Normal file
View File

@ -0,0 +1,10 @@
; Adapted from https://www.emacswiki.org/emacs/IndentingC
((c++-mode
(c-file-style . "stroustrup")
(innamespace . -)
(inline-open . 0)
(inher-cont . c-lineup-multi-inher)
(arglist-cont-nonempty . +)
(template-args-cont . +))
)