Skip to content

Commit b3b7c75

Browse files
committed
Fix editor config
1 parent 0c01fd2 commit b3b7c75

File tree

2 files changed

+92
-1
lines changed

2 files changed

+92
-1
lines changed

.editorconfig

+91-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,36 @@ root = true
66
# All Files
77
[*]
88
charset = utf-8
9-
end_of_line = crlf
109
indent_style = space
1110
indent_size = 4
1211
insert_final_newline = false
1312
trim_trailing_whitespace = true
13+
csharp_indent_labels = one_less_than_current
14+
csharp_using_directive_placement = outside_namespace:silent
15+
csharp_prefer_simple_using_statement = true:suggestion
16+
csharp_prefer_braces = true:silent
17+
csharp_style_namespace_declarations = block_scoped:silent
18+
csharp_style_prefer_method_group_conversion = true:silent
19+
csharp_style_prefer_top_level_statements = true:silent
20+
csharp_style_expression_bodied_methods = false:silent
21+
csharp_style_expression_bodied_constructors = false:silent
22+
csharp_style_expression_bodied_operators = false:silent
23+
csharp_style_expression_bodied_properties = true:silent
24+
csharp_style_expression_bodied_indexers = true:silent
25+
csharp_style_expression_bodied_accessors = true:silent
26+
csharp_style_expression_bodied_lambdas = true:silent
27+
csharp_style_expression_bodied_local_functions = false:silent
28+
csharp_style_throw_expression = true:suggestion
29+
csharp_style_prefer_null_check_over_type_check = true:suggestion
30+
csharp_prefer_simple_default_expression = true:suggestion
31+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
32+
csharp_style_prefer_index_operator = true:suggestion
33+
csharp_style_prefer_range_operator = true:suggestion
34+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
35+
csharp_style_prefer_tuple_swap = true:suggestion
36+
csharp_style_prefer_utf8_string_literals = true:suggestion
37+
csharp_style_inlined_variable_declaration = true:suggestion
38+
csharp_style_deconstructed_variable_declaration = true:suggestion
1439

1540
# Solution Files
1641
[*.sln]
@@ -36,3 +61,68 @@ insert_final_newline = true
3661
# Bash Files
3762
[*.sh]
3863
end_of_line = lf
64+
65+
[*.{cs,vb}]
66+
#### Naming styles ####
67+
68+
# Naming rules
69+
70+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
71+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
72+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
73+
74+
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
75+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
76+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
77+
78+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
79+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
80+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
81+
82+
# Symbol specifications
83+
84+
dotnet_naming_symbols.interface.applicable_kinds = interface
85+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
86+
dotnet_naming_symbols.interface.required_modifiers =
87+
88+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
89+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
90+
dotnet_naming_symbols.types.required_modifiers =
91+
92+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
93+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
94+
dotnet_naming_symbols.non_field_members.required_modifiers =
95+
96+
# Naming styles
97+
98+
dotnet_naming_style.begins_with_i.required_prefix = I
99+
dotnet_naming_style.begins_with_i.required_suffix =
100+
dotnet_naming_style.begins_with_i.word_separator =
101+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
102+
103+
dotnet_naming_style.pascal_case.required_prefix =
104+
dotnet_naming_style.pascal_case.required_suffix =
105+
dotnet_naming_style.pascal_case.word_separator =
106+
dotnet_naming_style.pascal_case.capitalization = pascal_case
107+
108+
dotnet_naming_style.pascal_case.required_prefix =
109+
dotnet_naming_style.pascal_case.required_suffix =
110+
dotnet_naming_style.pascal_case.word_separator =
111+
dotnet_naming_style.pascal_case.capitalization = pascal_case
112+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
113+
tab_width = 4
114+
dotnet_style_coalesce_expression = true:suggestion
115+
dotnet_style_null_propagation = true:suggestion
116+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
117+
dotnet_style_prefer_auto_properties = true:silent
118+
dotnet_style_object_initializer = true:suggestion
119+
dotnet_style_collection_initializer = true:suggestion
120+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
121+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
122+
dotnet_style_prefer_conditional_expression_over_return = true:silent
123+
dotnet_style_explicit_tuple_names = true:suggestion
124+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
125+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
126+
dotnet_style_prefer_compound_assignment = true:suggestion
127+
dotnet_style_prefer_simplified_interpolation = true:suggestion
128+
dotnet_style_namespace_match_folder = true:suggestion

src/Tomlyn.sln

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tomlyn.Tests", "Tomlyn.Test
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0EFAEDCD-25FB-4D3A-9828-6C5F00E4227D}"
1111
ProjectSection(SolutionItems) = preProject
12+
..\.editorconfig = ..\.editorconfig
1213
..\.gitignore = ..\.gitignore
1314
..\.gitmodules = ..\.gitmodules
1415
..\changelog.md = ..\changelog.md

0 commit comments

Comments
 (0)