Skip to content

Commit 797b447

Browse files
authored
Add explicit clang-format file with P4C style (#64)
Signed-off-by: Anton Korobeynikov <[email protected]>
1 parent 1a2d574 commit 797b447

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.clang-format

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
IndentWidth: 4
5+
FixNamespaceComments: true
6+
ColumnLimit: 100
7+
SpacesBeforeTrailingComments: 2
8+
AccessModifierOffset: -3
9+
10+
IncludeBlocks: Regroup
11+
# Force pointers to the type for C++.
12+
DerivePointerAlignment: false
13+
PointerAlignment: Right
14+
Standard: c++17
15+
IncludeCategories:
16+
# Matches common headers first and sorts them before project includes
17+
- Regex: '^<.+/.*\.h>'
18+
Priority: 2000
19+
- Regex: "^<.+/.*>"
20+
Priority: 4000
21+
- Regex: '^<.*\.h>'
22+
Priority: 1000
23+
- Regex: "^<.*>"
24+
Priority: 3000
25+
- Regex: "testgen/.*"
26+
Priority: 6000
27+
- Regex: ".*"
28+
Priority: 5000
29+
IncludeIsMainRegex: '(_test)?$'
30+
...

0 commit comments

Comments
 (0)