-
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy path.editorconfig
More file actions
148 lines (117 loc) · 6.3 KB
/
Copy path.editorconfig
File metadata and controls
148 lines (117 loc) · 6.3 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
root = true
[*.{cpp,hpp,h,c}]
indent_size = 4
indent_style = space
tab_width = 4
end_of_line = lf
[CMakeLists.txt]
indent_size = 4
indent_style = space
tab_width = 4
[*.cs]
guidelines = 80, 120
indent_size = 4
indent_style = space
tab_width = 4
end_of_line = crlf
# .NET Conventions
dotnet_style_namespace_match_folder = false
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
dotnet_style_require_accessibility_modifiers = for_non_interface_members
dotnet_style_prefer_collection_expression = when_types_loosely_match
dotnet_code_quality_unused_parameters = all
# C# Conventions - var preferences
csharp_style_var_elsewhere = true
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
# Expression-bodied members
csharp_style_expression_bodied_accessors = true
csharp_style_expression_bodied_constructors = false
csharp_style_expression_bodied_indexers = true
csharp_style_expression_bodied_lambdas = true
csharp_style_expression_bodied_local_functions = false
csharp_style_expression_bodied_methods = false
csharp_style_expression_bodied_operators = false
csharp_style_expression_bodied_properties = true
# Pattern matching preferences
csharp_style_prefer_extended_property_pattern = true
csharp_style_prefer_not_pattern = true
csharp_style_prefer_pattern_matching = true
csharp_style_prefer_switch_expression = true
# Modifier preferences
csharp_prefer_static_local_function = true
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
csharp_style_prefer_readonly_struct = true
csharp_style_prefer_readonly_struct_member = true
# Code-block preferences
csharp_style_namespace_declarations = file_scoped
csharp_style_prefer_primary_constructors = true
# Unused value preferences
csharp_style_unused_value_assignment_preference = discard_variable
csharp_style_unused_value_expression_statement_preference = discard_variable
# Using directive preferences
csharp_using_directive_placement = outside_namespace
# Indentation preferences
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# Naming rules
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_public_fields_should_begin_with_underscore.severity = suggestion
dotnet_naming_rule.non_public_fields_should_begin_with_underscore.symbols = non_public_fields
dotnet_naming_rule.non_public_fields_should_begin_with_underscore.style = begins_with_underscore
dotnet_naming_rule.public_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.public_fields_should_be_pascal_case.symbols = public_fields
dotnet_naming_rule.public_fields_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.const_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.const_fields_should_be_pascal_case.symbols = const_fields
dotnet_naming_rule.const_fields_should_be_pascal_case.style = pascal_case
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_public_fields.applicable_kinds = field
dotnet_naming_symbols.non_public_fields.applicable_accessibilities = internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.public_fields.applicable_kinds = field
dotnet_naming_symbols.public_fields.applicable_accessibilities = public
dotnet_naming_symbols.const_fields.applicable_kinds = field
dotnet_naming_symbols.const_fields.applicable_accessibilities = internal, private, protected, protected_internal, private_protected, public
dotnet_naming_symbols.const_fields.required_modifiers = const
# Naming styles
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.capitalization = pascal_case
dotnet_naming_style.begins_with_underscore.required_prefix = _
dotnet_naming_style.begins_with_underscore.capitalization = camel_case
# CA1707: Identifiers should not contain underscores
# Justification: We mirror the names from the open.mp API, including types, interfaces and constants.
dotnet_diagnostic.CA1707.severity = none
# CA1711: Identifiers should not have incorrect suffix
# Justification: We mirror the names from the open.mp API, including types, interfaces and constants.
dotnet_diagnostic.CA1711.severity = none
# CA1716: Identifiers should not match keywords
# Justification: Too many false positives for identifiers such as 'overloads' or 'loop'.
dotnet_diagnostic.CA1716.severity = none
# CA1720: Identifier contains type name
# Justification: We use 'Object' in many places to reference SA-MP objects.
dotnet_diagnostic.CA1720.severity = none
# CA1822: Mark members as static
# Justification: Event handlers in ECS must be instance methods.
dotnet_diagnostic.CA1822.severity = none
# CA1062: Validate arguments of public methods
[src/SampSharp.OpenMp.*/**/*.cs]
dotnet_diagnostic.CA1062.severity = warning