forked from open62541/open62541
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
64 lines (49 loc) · 1.62 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
Language: Cpp
BasedOnStyle: llvm
IndentWidth: 4
ColumnLimit: 90
SpacesBeforeTrailingComments: 2
ForEachMacros: [ foreach, LIST_FOREACH, LIST_FOREACH_SAFE ]
DisableFormat: false
# No space between if and parentheses
SpaceBeforeParens: Never
# Format function declarations
BinPackParameters: true
AllowAllParametersOfDeclarationOnNextLine: true
AlignAfterOpenBracket: Align
AlwaysBreakAfterReturnType: All
IndentCaseLabels: true
# Order of includes
IncludeBlocks: Regroup
# Includes are sorted with increasing priority number and then alphabetically
# The first regex which matches is the resulting priority
# We want something like this:
#include <open62541/client_subscriptions.h>
#include <open62541/client_highlevel.h>
#include <open62541/client_config_default.h>
#include <open62541/plugin/log_stdout.h>
#include "server/ua_server_internal.h"
#include "ua_network_tcp.h"
#include "ua_securechannel.h"
#include "ua_types_encoding_binary.h"
#include <check.h>
#include <stdlib.h>
#include "testing_clock.h"
#include "thread_wrapper.h"
IncludeCategories:
# Public open62541 includes starting with <open62541/
- Regex: '^(<(open62541)\/)'
Priority: 10
# Public open62541 includes starting with "open62541/
- Regex: '^("(open62541)\/)'
Priority: 20
# Internal open62541 includes starting with "ua_" or "open62541_"
- Regex: '^((<|")(([[:alnum:]]+\/)?ua_|open62541_))'
Priority: 30
# All other system header
- Regex: '<[[:alnum:].]+>'
Priority: 40
# The rest
- Regex: '.*'
Priority: 50