Repository navigation
Expand file tree
/
Copy pathformatj.toml
More file actions
267 lines (242 loc) · 6.89 KB
/
Copy pathformatj.toml
File metadata and controls
267 lines (242 loc) · 6.89 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# Managed by CleanroomMC/Conventions. Do not edit locally.
#
# This is the single source of truth for Java layout in this organization.
#
# Rules are spelled out even where they match FormatJ's built-in default.
[file]
# .editorconfig fixes the line ending and the final newline for every file in the repository,
# so those two follow it rather than the old profile (which never added a final newline).
line-ending = "lf"
final-newline = true
trim-trailing-whitespace = true
charset = "UTF-8"
tab-width = 4
[indent]
size = 4
use-tabs = false
continuation = 8
chained-call = 8
array-initializer = 8
ternary = 8
throws-clause = 8
switch-case-labels = true
switch-case-body = true
blank-lines = false
[wrapping]
max-line-length = 120
method-parameters = "wrap-if-long"
method-arguments = "wrap-if-long"
chained-calls = "break-all-when-too-long"
chain-threshold = 2
binary-operators = "wrap-if-long"
operator-position = "before-operator"
method-reference = "never"
method-reference-operator-position = "before-operator"
instanceof = "preserve"
instanceof-operator-position = "after-operator"
multicatch = "never"
multicatch-separator-position = "before-operator"
intersection-types = "never"
intersection-separator-position = "before-operator"
ternary = "wrap-if-long"
assignment = "never"
assignment-break = "inside-value"
hug-sole-argument = true
array-initializers = "wrap-if-long"
extends-implements = "wrap-if-long"
throws-clause = "wrap-if-long"
annotation-arguments = "wrap-if-long"
closing-delimiter = "attached"
break-after-open-paren = false
enum-constants = "chop-down-always"
require-enum-constant-semicolon = false
for-statement = "chop-down-if-long"
try-resources = "never"
keep-simple-methods-on-one-line = false
keep-simple-classes-on-one-line = false
keep-simple-lambdas-on-one-line = false
[braces]
class-placement = "end-of-line"
method-placement = "end-of-line"
control-placement = "end-of-line"
lambda-placement = "end-of-line"
if-else = "always"
for-loop = "always"
while-loop = "always"
else-on-new-line = false
catch-on-new-line = false
finally-on-new-line = false
empty-class-body = "spaced"
empty-method-body = "spaced"
empty-control-body = "spaced"
[spacing]
before-method-declaration-parenthesis = false
before-method-call-parenthesis = false
before-if-parenthesis = true
before-for-parenthesis = true
before-while-parenthesis = true
before-switch-parenthesis = true
before-catch-parenthesis = true
before-synchronized-parenthesis = true
within-parentheses = false
within-brackets = false
within-array-initializer-braces = true
within-angle-brackets = false
around-assignment-operators = true
around-binary-operators = true
around-unary-operators = false
around-lambda-arrow = true
around-ternary-operators = true
around-method-reference-operator = false
around-multicatch-separator = true
around-intersection-separator = true
after-comma = true
before-comma = false
after-semicolon-in-for = true
before-semicolon = false
after-type-cast = true
before-colon-in-enhanced-for = true
after-colon-in-enhanced-for = true
before-colon-in-case-label = false
around-case-arrow = true
before-annotation-parenthesis = false
before-array-brackets = false
after-varargs-ellipsis = true
[blank-lines]
max-consecutive = 1
after-package = 1
after-imports = 1
before-class = 1
before-method = 1
before-field = 0
after-class-opening-brace = 1
before-class-closing-brace = 1
strip-at-brace-edges = false
around-initializer-block = 1
before-record-compact-constructor = 1
after-enum-constants = 0
before-first-enum-constant = 1
between-switch-cases = 0
between-member-groups = 1
[alignment]
consecutive-fields = "none"
consecutive-variables = "none"
consecutive-assignments = "none"
method-chains = "none"
annotation-values = "none"
switch-arrows = "none"
ternary-branches = "none"
trailing-comments = "none"
[annotations]
declaration-placement = "new-line"
parameter-placement = "same-line"
field-placement = "same-line"
package-placement = "same-line"
single-marker-inline = false
[imports]
order = "ascending"
# Groups descend from the code we own to the platforms we sit on. The longest matching prefix wins,
# so a prefix that no file uses costs nothing.
groups = [
# Ours
["com.cleanroommc", "zone.rong", "top.outlands"],
# Third-party
"*",
# Gradle
"org.gradle",
# Coremods and bytecode
["org.spongepowered", "com.llamalad7", "org.objectweb.asm"],
# The game
["net.minecraft", "net.minecraftforge", "mcp", "com.mojang", "org.lwjgl"],
# JDK
["javax", "java"],
]
static-placement = "last"
blank-line-between-groups = true
module-imports-first = true
remove-unused = false
[modifiers]
order = "canonical"
visibility-position = "first"
remove-redundant = true
[module]
brace-placement = "inherit"
empty-body = "inherit"
blank-lines-after-opening-brace = "inherit"
blank-lines-before-closing-brace = "inherit"
blank-lines-between-directive-groups = 0
exports-opens-target-list-wrapping = "never"
provides-implementation-list-wrapping = "never"
[comments]
reflow = "preserve"
block-comment-star-alignment = true
trailing-comment-min-spaces = 1
trailing-comment-column = 0
keep-first-column-comments = false
indent-with-code = true
honour-formatter-off = true
off-marker = "@formatter:off"
on-marker = "@formatter:on"
[javadoc]
wrap = false
tag-order = "preserve"
blank-line-before-tags = true
align-tag-descriptions = false
add-paragraph-tags = false
keep-single-line = false
tag-continuation-indent = 0
closing-tag-form = "preserve"
opening-tag-position = "preserve"
[switch]
case-style = "arrow"
arrow-case-braces = "when-multi-statement"
yield-style = "expression-when-possible"
multi-label-wrapping = "wrap-if-long"
null-default-on-one-line = true
guard-on-same-line = true
arrow-body-on-new-line-when-long = true
[records]
component-wrapping = "chop-down-if-long"
single-line-empty-body = false
compact-constructor-blank-line = false
with-style = "inline-when-short"
space-before-with-block = true
[patterns]
deconstruction-wrapping = "wrap-if-long"
keep-simple-pattern-inline = true
nested-indent = 4
[sealed]
permits-wrapping = "wrap-if-long"
permits-order = "preserve"
permits-on-new-line = false
[lambdas]
parameter-style = "omit-when-possible"
body-braces = "when-multi-statement"
keep-single-expression-inline = true
[text-blocks]
indent-policy = "minimal"
closing-delimiter-on-own-line = false
escape-trailing-spaces = false
[literals]
long-suffix = "upper"
hex-digits = "upper"
[semicolons]
remove-redundant = true
[preservation]
keep-author-blank-lines = true
max-preserved-blank-lines = 1
keep-line-break-after-open-paren = false
keep-simple-blocks-inline = false
keep-array-initializer-layout = false
respect-existing-chain-breaks = false
never-join-lines = false
[declarations]
split-variables = true
[arrays]
c-style-brackets = "java"
[members]
order = "intellij"
field-order = ["static-final", "static", "final", "instance"]
visibility-order = ["public", "protected", "package-private", "private"]
field-visibility-order = true
method-visibility-order = true