-
Notifications
You must be signed in to change notification settings - Fork 3
/
.editorconfig
executable file
·76 lines (58 loc) · 2.69 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
# Visual Studio Reference: https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options
# Rider Reference: https://www.jetbrains.com/help/rider/EditorConfig_Index.html
# top-most EditorConfig file
root = true
[*]
indent_style = tab
[*.{json,asmdef}]
indent_size = 2
[*.cs]
# Basic text
indent_size = 4
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true
charset = utf-8
# Only add settings that differs from default
# Avoid "this." if not necessary
# Keep commented until rider fixes the bug that considers this an error
#dotnet_style_qualification_for_field = false:suggestion
#dotnet_style_qualification_for_property = false:suggestion
#dotnet_style_qualification_for_method = false:suggestion
#dotnet_style_qualification_for_event = false:suggestion
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# Suggest acessibility modifier is redundant
dotnet_style_require_accessibility_modifiers = never:suggestion
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Prefer braces even on single line
csharp_prefer_braces = true:suggestion
# Rider doesn't seem to default to these
csharp_space_after_cast = false
csharp_preserve_single_line_blocks = true
# Rider/Resharper specific
csharp_space_within_single_line_array_initializer_braces = true
resharper_redundant_assignment_highlighting = suggestion
resharper_for_can_be_converted_to_foreach_highlighting = none
# Naming
# Symbols
dotnet_naming_symbols.public_members.applicable_kinds = property,method,field,event,delegate
dotnet_naming_symbols.public_members.applicable_accessibilities = public,internal,protected,protected_internal
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
# Styles
dotnet_naming_style.camel_case.capitalization = pascal_case
dotnet_naming_style.first_word_upper.capitalization = first_word_upper
# Rules
# Private fields recommend to be camelCase
dotnet_naming_rule.private_fields_camel_case.symbols = private_fields
dotnet_naming_rule.private_fields_camel_case.severity = suggestion
dotnet_naming_rule.private_fields_camel_case.style = camel_case
# Public members must be first word upper
dotnet_naming_rule.public_symbols_first_word_upper.symbols = public_members
dotnet_naming_rule.public_symbols_first_word_upper.severity = warning
dotnet_naming_rule.public_symbols_first_word_upper.style = first_word_upper