-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
110 lines (83 loc) · 2.67 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# インデント幅
IndentWidth: 4
# タブを使用するか
UseTab: Always
# タブ幅
TabWidth: 4
# columnの制限
ColumnLimit: 0
# 改行設定
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterStruct: true
AfterEnum: true
AfterFunction: true
BeforeElse: true
BeforeLambdaBody: true
BeforeCatch: true
BeforeWhile: true
# includeのソート
SortIncludes: CaseInsensitive
# includeブロックのソートをどうするか
IncludeBlocks: Preserve
#################################################
# preprocessor
# プリプロセッサ命令をインデントするか
IndentPPDirectives: AfterHash # ハッシュ後をインデント
#################################################
# control statement
# switchのcaseの中のブロックをインデントするか
IndentCaseBlocks: false
# switchのcaseラベルをインデントするか
IndentCaseLabels: true
# gotoのラベルをインデントするか
IndentGotoLabels: false
#################################################
# variables
# ポインタと参照の位置
PointerAlignment: Left
#################################################
# function
# 短い関数を一行にまとめるか
AllowShortFunctionsOnASingleLine: None
#################################################
# namespace
# 名前空間の終わりのかっこにコメントを追加する
FixNamespaceComments: true
# 何行で終わりかっこにコメントを追加するか
ShortNamespaceLines: 0
#################################################
# class
# アクセス指定子をインデントするか
IndentAccessModifiers: false
# アクセス指定子のインデントの幅
AccessModifierOffset: -4
# コンストラクタのメンバ初期化の改行位置
BreakConstructorInitializers: BeforeComma
# コンストラクタの初期化を一行にまとめるかそれぞれの行にするか
ConstructorInitializerAllOnOneLineOrOnePerLine: false
# クラスの継承のベースクラスの改行位置
BreakInheritanceList: BeforeComma
#################################################
# operators
# 演算子の改行方法
BreakBeforeBinaryOperators: NonAssignment # 演算子後に改行
# 長い文字列を分割するか
# "veryverylongtext"
# これを
# "veryvery"
# "longtext"
# こんな感じに
BreakStringLiterals: false
#################################################
# lambda
# 短いラムダ式を一行にまとめるか
AllowShortLambdasOnASingleLine: None
#################################################
# binpack
# falseだと引数が複数行の時に引数ごとに改行される
BinPackArguments: false
BinPackParameters: false