-
Notifications
You must be signed in to change notification settings - Fork 435
/
.editorconfig
132 lines (115 loc) · 6.89 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
root = true
[*]
charset = utf-8
max_line_length = off
[*.cs]
# spacing rules
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
# Code style defaults
dotnet_diagnostic.IDE0001.severity = error # Simplify name
dotnet_diagnostic.IDE0002.severity = error # Simplify member access
dotnet_diagnostic.IDE0004.severity = error # Remove unnecessary cast
dotnet_diagnostic.IDE0005.severity = error # Remove unnecessary import
dotnet_diagnostic.IDE0035.severity = error # Remove unreachable code
dotnet_diagnostic.IDE0043.severity = error # Format string contains invalid placeholder
dotnet_diagnostic.IDE0063.severity = error # Use simple 'using' statement
csharp_style_var_when_type_is_apparent = true:error
dotnet_style_require_accessibility_modifiers = always:error
# Sort using directives with System.* appearing first
dotnet_sort_system_directives_first = true:error
dotnet_separate_import_directive_groups = false:error
csharp_using_directive_placement = outside_namespace:error
# Order modifiers
dotnet_diagnostic.IDE0036.severity = error
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
# Add braces
dotnet_diagnostic.IDE0011.severity = error
csharp_prefer_braces = true:error
# Avoid "this." if not necessary
dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_event = false:error
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error
# Enforce more modern language features when available
dotnet_style_object_initializer = true:error
dotnet_style_collection_initializer = true:error
dotnet_style_coalesce_expression = true:error
dotnet_style_null_propagation = true:error
dotnet_style_explicit_tuple_names = true:error
# naming rules
# namespace Unity.Netcode { ... }
# public class NetworkObject { ... }
# public void Spawn(...) { ... }
dotnet_naming_symbols.usertypes_naming_symbols.applicable_kinds = namespace, class, struct, enum, property, method, field, event, delegate, local_function
dotnet_naming_symbols.usertypes_naming_symbols.applicable_accessibilities = public, internal
dotnet_naming_style.usertypes_naming_style.capitalization = pascal_case
dotnet_naming_rule.usertypes_naming_rule.symbols = usertypes_naming_symbols
dotnet_naming_rule.usertypes_naming_rule.style = usertypes_naming_style
dotnet_naming_rule.usertypes_naming_rule.severity = error
# public void ChangeOwnership(ulong newOwnerClientId) { ... }
# ulong[] targetClientIds = clientRpcParams.Send.TargetClientIds;
dotnet_naming_symbols.paramlocal_naming_symbols.applicable_kinds = parameter, local
dotnet_naming_symbols.paramlocal_naming_symbols.applicable_accessibilities = *
dotnet_naming_style.paramlocal_naming_style.capitalization = camel_case
dotnet_naming_rule.paramlocal_naming_rule.symbols = paramlocal_naming_symbols
dotnet_naming_rule.paramlocal_naming_rule.style = paramlocal_naming_style
dotnet_naming_rule.paramlocal_naming_rule.severity = error
# interface INetworkSerializable
dotnet_naming_symbols.interface_naming_symbols.applicable_kinds = interface
dotnet_naming_symbols.interface_naming_symbols.applicable_accessibilities = public, internal
dotnet_naming_style.interface_naming_style.required_prefix = I
dotnet_naming_style.interface_naming_style.capitalization = pascal_case
dotnet_naming_rule.interface_naming_rule.symbols = interface_naming_symbols
dotnet_naming_rule.interface_naming_rule.style = interface_naming_style
dotnet_naming_rule.interface_naming_rule.severity = error
# class NetworkVariable<T>
# class NetworkDictionary<TKey, TValue>
dotnet_naming_symbols.typeparam_naming_symbols.applicable_kinds = type_parameter
dotnet_naming_symbols.typeparam_naming_symbols.applicable_accessibilities = public, internal
dotnet_naming_style.typeparam_naming_style.required_prefix = T
dotnet_naming_style.typeparam_naming_style.capitalization = pascal_case
dotnet_naming_rule.typeparam_naming_rule.symbols = typeparam_naming_symbols
dotnet_naming_rule.typeparam_naming_rule.style = typeparam_naming_style
dotnet_naming_rule.typeparam_naming_rule.severity = error
# const int k_MaxCount
dotnet_naming_symbols.constant_naming_symbols.applicable_kinds = field
dotnet_naming_symbols.constant_naming_symbols.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.constant_naming_symbols.required_modifiers = const
dotnet_naming_style.constant_naming_style.required_prefix = k_
dotnet_naming_style.constant_naming_style.capitalization = pascal_case
dotnet_naming_rule.constant_naming_rule.symbols = constant_naming_symbols
dotnet_naming_rule.constant_naming_rule.style = constant_naming_style
dotnet_naming_rule.constant_naming_rule.severity = error
# static readonly Vector3 k_DefaultLength
dotnet_naming_symbols.staticreadonly_naming_symbols.applicable_kinds = field
dotnet_naming_symbols.staticreadonly_naming_symbols.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.staticreadonly_naming_symbols.required_modifiers = static, readonly
dotnet_naming_style.staticreadonly_naming_style.required_prefix = k_
dotnet_naming_style.staticreadonly_naming_style.capitalization = pascal_case
dotnet_naming_rule.staticreadonly_naming_rule.symbols = staticreadonly_naming_symbols
dotnet_naming_rule.staticreadonly_naming_rule.style = staticreadonly_naming_style
dotnet_naming_rule.staticreadonly_naming_rule.severity = error
# static int s_SharedCount
dotnet_naming_symbols.staticfield_naming_symbols.applicable_kinds = field
dotnet_naming_symbols.staticfield_naming_symbols.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.staticfield_naming_symbols.required_modifiers = static
dotnet_naming_style.staticfield_naming_style.required_prefix = s_
dotnet_naming_style.staticfield_naming_style.capitalization = pascal_case
dotnet_naming_rule.staticfield_naming_rule.symbols = staticfield_naming_symbols
dotnet_naming_rule.staticfield_naming_rule.style = staticfield_naming_style
dotnet_naming_rule.staticfield_naming_rule.severity = error
# int m_CurrentCount
dotnet_naming_symbols.memberfield_naming_symbols.applicable_kinds = field
dotnet_naming_symbols.memberfield_naming_symbols.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_style.memberfield_naming_style.required_prefix = m_
dotnet_naming_style.memberfield_naming_style.capitalization = pascal_case
dotnet_naming_rule.memberfield_naming_rule.symbols = memberfield_naming_symbols
dotnet_naming_rule.memberfield_naming_rule.style = memberfield_naming_style
dotnet_naming_rule.memberfield_naming_rule.severity = error