-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.editorconfig
299 lines (239 loc) · 12.1 KB
/
.editorconfig
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# there is only one editorconfig for our project so it is automatically the root config
root = true
[*]
# the charset helps with guaranteeing that all chars are encoded in the same way
charset = utf-8
# we solely use spaces for our formatting, so the indent needs to be fixed as well
indent_size = 4
tab_width = 4
ij_continuation_indent_size = 8
indent_style = space
ij_smart_tabs = false
# provide the visual guide and hard wrap, so we don't write overly long lines (but don't wrap automatically
ij_visual_guides = 100
max_line_length = 120
ij_wrap_on_typing = false
# the final newline helps with old/unix tools so that they can properly print files
insert_final_newline = true
# trailing whitespaces serve absolutely no value, so we can trim them away
trim_trailing_whitespace = true
# we do not use the formatter tag at all, since all files need to be compliant
ij_formatter_tags_enabled = false
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
[.editorconfig]
# spaces after the comma are in line with our other codestyle and increase the readability
ij_editorconfig_space_after_comma = true
ij_editorconfig_space_before_comma = false
# colons are used as regular characters, so we use no spaces at all
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_after_colon = false
# spaces around the assignment operator increase the readability
ij_editorconfig_spaces_around_assignment_operators = true
# since there are some very long keys, this is detrimental to the readability
ij_editorconfig_align_group_field_declarations = false
[*.md]
# we want spaces after syntactical elements so we enforce them
ij_markdown_force_one_space_after_blockquote_symbol = true
ij_markdown_force_one_space_after_header_symbol = true
ij_markdown_force_one_space_after_list_bullet = true
ij_markdown_force_one_space_between_words = true
# indents on empty lines serve no real purpose and can therefore be trimmed away
ij_markdown_keep_indents_on_empty_lines = false
# paragraphs have exactly one
ij_markdown_max_lines_between_paragraphs = 1
ij_markdown_min_lines_between_paragraphs = 1
# block elements have exactly one newline around them to increase the readability
ij_markdown_min_lines_around_block_elements = 1
ij_markdown_max_lines_around_block_elements = 1
# headers have exactly one newline around them to increase the readability
ij_markdown_min_lines_around_header = 1
ij_markdown_max_lines_around_header = 1
[*.properties]
# properties are only key value stores so newlines serve no value at all
ij_properties_keep_blank_lines = false
# using equals as the delimiter is intuitive and we don't use this char often, so it does not collide
ij_properties_key_value_delimiter = equals
# we use properties files only for technical key value stores, so they don't have to be pretty
ij_properties_align_group_field_declarations = false
ij_properties_spaces_around_key_value_delimiter = false
[{*.yml,*.yaml}]
# yaml structures can get nested very easily, so we reduce the indent to compensate for that
indent_size = 2
tab_width = 2
# some keys can get very long, so we don't want to align all of them together
ij_yaml_align_values_properties = do_not_align
# the indents for empty lines serve absolutely no value, so we remove them
ij_yaml_block_mapping_on_new_line = false
ij_yaml_keep_indents_on_empty_lines = false
# sequence values are already kind of indented because of the hyphen, so we don't indent additionally
ij_yaml_autoinsert_sequence_marker = true
ij_yaml_indent_sequence_value = false
# yaml files are used as configuration so line breaks are crucial for the readability
ij_yaml_keep_line_breaks = true
ij_yaml_sequence_on_new_line = false
# we don't need spaces before colons
ij_yaml_space_before_colon = false
# we don't need any spaces within brackets or braces as this is the compressed representation
ij_yaml_spaces_within_braces = false
ij_yaml_spaces_within_brackets = false
[*.xml]
# html structures can get nested very easily, so we reduce the indent to compensate for that
indent_size = 2
tab_width = 2
# align the attributes for multiline tags so that they can easily be read and associated to the tag
ij_xml_align_attributes = true
# text is free and does not need to be aligned when multiline as that saves some space for long values
ij_xml_align_text = false
# we perform standard wrapping around attributes for xml tags
ij_xml_attribute_wrap = normal
ij_xml_text_wrap = normal
# comments start at the first column so that we can use the maximum space
ij_xml_block_comment_at_first_column = true
ij_xml_line_comment_at_first_column = true
# we keep a maximum of two blank lines as that should be enough to represent the structure of the properties
ij_xml_keep_blank_lines = 2
ij_xml_keep_line_breaks = true
# isolate and clean text values, dropping invisible whitespaces while preserving spaces that affect the content
ij_xml_keep_whitespaces = false
ij_xml_keep_whitespaces_around_cdata = preserve
ij_xml_keep_whitespaces_inside_cdata = false
ij_xml_keep_line_breaks_in_text = true
# indents on empty lines serve no value, so we trim them away
ij_xml_keep_indents_on_empty_lines = false
# we write the tags in a compressed manner as xml files are primarily used for machine generated output/input
ij_xml_space_after_tag_name = false
ij_xml_space_around_equals_in_attribute = false
ij_xml_space_inside_empty_tag = false
[*.html]
# html structures can get nested very easily, so we reduce the indent to compensate for that
indent_size = 2
tab_width = 2
# continuations are indented with four spaces to separate them from nested elements
ij_continuation_indent_size = 4
# declare important, structural tags that have newlines before them to emphasize the document structure
ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3
# align the attributes for multiline tags so that they can easily be read and associated to the tag
ij_html_align_attributes = true
# text is free and does not need to be aligned when multiline as that saves some space for long values
ij_html_align_text = false
# we perform standard wrapping around attributes for html tags
ij_html_attribute_wrap = normal
ij_html_text_wrap = normal
# comments start at the first column so that we can use the maximum space
ij_html_block_comment_at_first_column = true
ij_html_line_comment_at_first_column = true
# by default we use double quotes, so that we can use single quotes within them (for stuff like CSS)
ij_html_quote_style = double
ij_html_enforce_quotes = true
# we do not indent script or style, because they are like embedded documents within the html document
ij_html_do_not_indent_children_of_tags = script, style
# we align all children, regardless of the amount of lines that the tag is big
ij_html_do_not_align_children_of_min_lines = 0
# we write the tags in their compressed form, as that is the usual style, known to anybody who knows html
ij_html_space_after_tag_name = false
ij_html_space_around_equality_in_attribute = false
ij_html_space_inside_empty_tag = true
# newlines before line breaks are confusing as it is hard to know how many line breaks there will be now
ij_html_remove_new_line_before_tags = br
# we insert newlines if the attributes are multiline, but never before any attribute
ij_html_new_line_after_last_attribute = when multiline
ij_html_new_line_before_first_attribute = never
# we try to keep those tags as inline tags so that the structure is easier to read
ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p
ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var
# we keep a maximum of two blank lines as that should be enough to represent the structure of the properties
ij_html_keep_blank_lines = 2
ij_html_keep_line_breaks = true
ij_html_keep_line_breaks_in_text = true
# indents on empty lines serve no value, so we trim them away
ij_html_keep_indents_on_empty_lines = false
# isolate and clean text values, dropping invisible whitespaces while preserving spaces that affect the content
ij_html_keep_whitespaces = false
ij_html_keep_whitespaces_inside = span, pre, textarea
[*.{kt,kts}]
ktlint_code_style = intellij_idea
ij_continuation_indent_size = 4
ij_kotlin_align_in_columns_case_branch = false
ij_kotlin_align_multiline_binary_operation = false
ij_kotlin_align_multiline_extends_list = false
ij_kotlin_align_multiline_method_parentheses = false
ij_kotlin_align_multiline_parameters = false
ij_kotlin_align_multiline_parameters_in_calls = false
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_assignment_wrap = normal
ij_kotlin_blank_lines_after_class_header = 0
ij_kotlin_blank_lines_around_block_when_branches = 0
ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1
ij_kotlin_block_comment_add_space = false
ij_kotlin_block_comment_at_first_column = true
ij_kotlin_call_parameters_new_line_after_left_paren = true
ij_kotlin_call_parameters_right_paren_on_new_line = true
ij_kotlin_call_parameters_wrap = on_every_item
ij_kotlin_catch_on_new_line = false
ij_kotlin_class_annotation_wrap = split_into_lines
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
ij_kotlin_continuation_indent_for_chained_calls = false
ij_kotlin_continuation_indent_for_expression_bodies = false
ij_kotlin_continuation_indent_in_argument_lists = false
ij_kotlin_continuation_indent_in_elvis = false
ij_kotlin_continuation_indent_in_if_conditions = false
ij_kotlin_continuation_indent_in_parameter_lists = false
ij_kotlin_continuation_indent_in_supertype_lists = false
ij_kotlin_else_on_new_line = false
ij_kotlin_enum_constants_wrap = off
ij_kotlin_extends_list_wrap = normal
ij_kotlin_field_annotation_wrap = split_into_lines
ij_kotlin_finally_on_new_line = false
ij_kotlin_if_rparen_on_new_line = true
ij_kotlin_import_nested_classes = false
ij_kotlin_imports_layout = *, java.**, javax.**, kotlin.**, ^
ij_kotlin_insert_whitespaces_in_simple_one_line_method = true
ij_kotlin_keep_blank_lines_before_right_brace = 0
ij_kotlin_keep_blank_lines_in_code = 1
ij_kotlin_keep_blank_lines_in_declarations = 1
ij_kotlin_keep_first_column_comment = true
ij_kotlin_keep_indents_on_empty_lines = false
ij_kotlin_keep_line_breaks = true
ij_kotlin_lbrace_on_next_line = false
ij_kotlin_line_break_after_multiline_when_entry = true
ij_kotlin_line_comment_add_space = true
ij_kotlin_line_comment_add_space_on_reformat = false
ij_kotlin_line_comment_at_first_column = false
ij_kotlin_method_annotation_wrap = split_into_lines
ij_kotlin_method_call_chain_wrap = normal
ij_kotlin_method_parameters_new_line_after_left_paren = true
ij_kotlin_method_parameters_right_paren_on_new_line = true
ij_kotlin_method_parameters_wrap = on_every_item
ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
ij_kotlin_packages_to_use_import_on_demand = kotlinx.android.synthetic.**
ij_kotlin_parameter_annotation_wrap = off
ij_kotlin_space_after_comma = true
ij_kotlin_space_after_extend_colon = true
ij_kotlin_space_after_type_colon = true
ij_kotlin_space_before_catch_parentheses = true
ij_kotlin_space_before_comma = false
ij_kotlin_space_before_extend_colon = true
ij_kotlin_space_before_for_parentheses = true
ij_kotlin_space_before_if_parentheses = true
ij_kotlin_space_before_lambda_arrow = true
ij_kotlin_space_before_type_colon = false
ij_kotlin_space_before_when_parentheses = true
ij_kotlin_space_before_while_parentheses = true
ij_kotlin_spaces_around_additive_operators = true
ij_kotlin_spaces_around_assignment_operators = true
ij_kotlin_spaces_around_equality_operators = true
ij_kotlin_spaces_around_function_type_arrow = true
ij_kotlin_spaces_around_logical_operators = true
ij_kotlin_spaces_around_multiplicative_operators = true
ij_kotlin_spaces_around_range = false
ij_kotlin_spaces_around_relational_operators = true
ij_kotlin_spaces_around_unary_operator = false
ij_kotlin_spaces_around_when_arrow = true
ij_kotlin_variable_annotation_wrap = off
ij_kotlin_while_on_new_line = false
ij_kotlin_wrap_elvis_expressions = 1
ij_kotlin_wrap_expression_body_functions = 1
ij_kotlin_wrap_first_method_in_call_chain = false