Skip to content

Commit 96c30c6

Browse files
committed
make editorconfig settings non-rooted
1 parent 87ea932 commit 96c30c6

File tree

1 file changed

+166
-16
lines changed

1 file changed

+166
-16
lines changed

.editorconfig

Lines changed: 166 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# Remove the line below if you want to inherit .editorconfig settings from higher directories
2-
root = true
3-
41
[*]
52

63
# Indentation and spacing
7-
indent_size = 4
84
indent_style = tab
95

10-
# New line preferences
11-
end_of_line = crlf
6+
# Newline and whitespace preferences
7+
end_of_line = auto
128
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
charset = utf-8
12+
13+
[*.{yml,yaml}]
14+
15+
# YAML requires spaces for indentation
16+
indent_style = space
17+
indent_size = 4
1318

14-
# C# files
1519
[*.cs]
1620

1721
# Organize usings
@@ -115,6 +119,9 @@ csharp_style_throw_expression = true:suggestion
115119
csharp_style_unused_value_assignment_preference = discard_variable:silent
116120
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
117121

122+
# IDE0305: Collection initialization can be simplified (using .ToArray())
123+
dotnet_diagnostic.IDE0305.severity = none
124+
118125
# 'using' directive preferences
119126
csharp_using_directive_placement = outside_namespace:suggestion
120127

@@ -165,6 +172,12 @@ csharp_preserve_single_line_statements = false
165172

166173
#### Naming styles ####
167174

175+
# Style Definitions
176+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
177+
dotnet_naming_style.I_prefix_style.required_prefix = I
178+
dotnet_naming_style.I_prefix_style.capitalization = pascal_case
179+
dotnet_naming_style.camel_case_style.capitalization = camel_case
180+
168181
# Use PascalCase for constant fields
169182
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
170183
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
@@ -178,7 +191,7 @@ dotnet_naming_rule.pascal_case_for_public_fields.severity = warning
178191
dotnet_naming_rule.pascal_case_for_public_fields.symbols = public_fields
179192
dotnet_naming_rule.pascal_case_for_public_fields.style = pascal_case_style
180193
dotnet_naming_symbols.public_fields.applicable_kinds = field
181-
dotnet_naming_symbols.public_fields.applicable_accessibilities = public
194+
dotnet_naming_symbols.public_fields.applicable_accessibilities = public
182195

183196
# Interfaces must be PascalCase and have an I prefix
184197
dotnet_naming_rule.interfaces_start_with_I.severity = warning
@@ -187,16 +200,153 @@ dotnet_naming_rule.interfaces_start_with_I.style = I_prefix_st
187200
dotnet_naming_symbols.any_interface.applicable_kinds = interface
188201
dotnet_naming_symbols.any_interface.applicable_accessibilities = *
189202

190-
# Classes, structs, methods, enums, events, properties, namespaces, delegates must be PascalCase
203+
# Private properties, methods must be camelCase
204+
dotnet_naming_rule.privates_naming.severity = warning
205+
dotnet_naming_rule.privates_naming.symbols = privates
206+
dotnet_naming_rule.privates_naming.style = camel_case_style
207+
dotnet_naming_symbols.privates.applicable_kinds = property,method
208+
dotnet_naming_symbols.privates.applicable_accessibilities = private
209+
210+
# Types, namespaces, delegates, events, non-private properties/methods, type parameters must be PascalCase
191211
dotnet_naming_rule.general_naming.severity = warning
192212
dotnet_naming_rule.general_naming.symbols = general
193213
dotnet_naming_rule.general_naming.style = pascal_case_style
194-
dotnet_naming_symbols.general.applicable_kinds = class,struct,enum,property,method,event,namespace,delegate
195-
dotnet_naming_symbols.general.applicable_accessibilities = *
214+
dotnet_naming_symbols.general.applicable_kinds = class,struct,enum,namespace,delegate,event,property,method,type_parameter
215+
dotnet_naming_symbols.general.applicable_accessibilities = *
196216

197217
# Everything else is camelCase
198-
dotnet_naming_rule.everything_else_naming.severity = warning
199-
dotnet_naming_rule.everything_else_naming.symbols = everything_else
200-
dotnet_naming_rule.everything_else_naming.style = camel_case_style
201-
dotnet_naming_symbols.everything_else.applicable_kinds = *
202-
dotnet_naming_symbols.everything_else.applicable_accessibilities = *
218+
dotnet_naming_rule.everything_else_naming.severity = warning
219+
dotnet_naming_rule.everything_else_naming.symbols = everything_else
220+
dotnet_naming_rule.everything_else_naming.style = camel_case_style
221+
dotnet_naming_symbols.everything_else.applicable_kinds = *
222+
dotnet_naming_symbols.everything_else.applicable_accessibilities = *
223+
224+
[*.lua]
225+
226+
# none/single/double
227+
quote_style = double
228+
229+
# this mean utf8 length , if this is 'unset' then the line width is no longer checked
230+
# this option decides when to chopdown the code
231+
max_line_length = unset
232+
233+
# none / comma / semicolon / only_kv_colon
234+
table_separator_style = only_kv_colon
235+
236+
#optional keep/never/always/smart
237+
trailing_table_separator = smart
238+
239+
# keep/remove/remove_table_only/remove_string_only
240+
call_arg_parentheses = remove_table_only
241+
242+
detect_end_of_line = false
243+
244+
space_around_table_field_list = true
245+
246+
space_before_attribute = true
247+
248+
space_before_function_open_parenthesis = false
249+
250+
space_before_function_call_open_parenthesis = false
251+
252+
space_before_closure_open_parenthesis = false
253+
254+
# optional always/only_string/only_table/none
255+
# or true/false
256+
space_before_function_call_single_arg = only_string
257+
258+
space_before_open_square_bracket = false
259+
260+
space_inside_function_call_parentheses = false
261+
262+
space_inside_function_param_list_parentheses = false
263+
264+
space_inside_square_brackets = false
265+
266+
# like t[#t+1] = 1
267+
space_around_table_append_operator = true
268+
269+
ignore_spaces_inside_function_call = false
270+
271+
space_before_inline_comment = 1
272+
273+
space_around_math_operator = true
274+
275+
space_after_comma = true
276+
277+
space_after_comma_in_for_statement = true
278+
279+
# true/false or none/always/no_space_asym
280+
space_around_concat_operator = true
281+
282+
space_around_logical_operator = true
283+
284+
# true/false or none/always/no_space_asym
285+
space_around_assign_operator = true
286+
287+
align_call_args = false
288+
289+
align_function_params = false
290+
291+
align_continuous_assign_statement = false
292+
293+
align_continuous_rect_table_field = false
294+
295+
align_continuous_line_space = 2
296+
297+
align_if_branch = false
298+
299+
# option none / always / contain_curly/
300+
align_array_table = false
301+
302+
align_continuous_similar_call_args = false
303+
304+
align_continuous_inline_comment = false
305+
# option none / always / only_call_stmt
306+
align_chain_expr = none
307+
308+
never_indent_before_if_condition = false
309+
310+
never_indent_comment_on_if_branch = false
311+
312+
keep_indents_on_empty_lines = false
313+
314+
# The following (line_space_*) configuration supports four expressions
315+
# keep
316+
# fixed(n)
317+
# min(n)
318+
# max(n)
319+
# for eg. min(2)
320+
321+
line_space_after_if_statement = keep
322+
323+
line_space_after_do_statement = keep
324+
325+
line_space_after_while_statement = keep
326+
327+
line_space_after_repeat_statement = keep
328+
329+
line_space_after_for_statement = keep
330+
331+
line_space_after_local_or_assign_statement = keep
332+
333+
line_space_after_function_statement = fixed(2)
334+
335+
line_space_after_expression_statement = keep
336+
337+
line_space_after_comment = keep
338+
339+
line_space_around_block = fixed(1)
340+
341+
break_all_list_when_line_exceed = false
342+
343+
auto_collapse_lines = false
344+
345+
break_before_braces = false
346+
347+
ignore_space_after_colon = false
348+
349+
remove_call_expression_list_finish_comma = false
350+
351+
# keep / always / same_line / repalce_with_newline
352+
end_statement_with_semicolon = repalce_with_newline

0 commit comments

Comments
 (0)