Skip to content

Commit 2b84bef

Browse files
Add a .clang-format file implementing the Icinga 2 style guide
1 parent c28076a commit 2b84bef

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.clang-format

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
BasedOnStyle: LLVM
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: DontAlign
5+
BreakBeforeBraces: Mozilla
6+
ColumnLimit: 100
7+
IncludeCategories:
8+
- Regex: ^"(base|icinga|remote|test)/
9+
Priority: 1
10+
CaseSensitive: false
11+
- Regex: ^<boost/
12+
Priority: 2
13+
CaseSensitive: false
14+
- Regex: ^<
15+
Priority: 3
16+
CaseSensitive: false
17+
IndentCaseLabels: true
18+
IndentWidth: 4
19+
PenaltyBreakAssignment: 50
20+
PenaltyBreakBeforeFirstCallParameter: 50
21+
PenaltyBreakOpenParenthesis: 50
22+
PointerAlignment: Left
23+
ReferenceAlignment: Left
24+
TabWidth: 4
25+
UseTab: Always

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# Except those related to git and vagrant
55
!.git*
6+
!.clang-format
67
!.puppet*
78
!.travis.yml
89
!.mailmap

0 commit comments

Comments
 (0)