Skip to content

Commit 2f7720f

Browse files
authored
Merge pull request #50 from JansthcirlU:jansthcirlu/add-editorconfig
Added .editorconfig to see if it makes a difference for PR.
2 parents ea79cb7 + 493ff5e commit 2f7720f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.editorconfig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
root = true
2+
3+
[*.cs]
4+
# Basic formatting
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = crlf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
# 1. EXPLICIT TYPES (no var anywhere)
12+
csharp_style_var_for_built_in_types = false:error
13+
csharp_style_var_when_type_is_apparent = false:error
14+
csharp_style_var_elsewhere = false:error
15+
16+
# 2. SIMPLIFIED CONSTRUCTORS (use new() when type is apparent)
17+
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
18+
19+
# 3. COLLECTION EXPRESSIONS (use [1, 2, 3] syntax when possible)
20+
dotnet_style_prefer_collection_expression = true:warning
21+
22+
# Related collection/initializer preferences
23+
dotnet_style_collection_initializer = true:suggestion
24+
dotnet_style_object_initializer = true:suggestion
25+
26+
# Modern C# preferences that work well together
27+
csharp_style_namespace_declarations = file_scoped:warning
28+
csharp_prefer_braces = true:warning
29+
csharp_style_prefer_method_group_conversion = true:suggestion
30+
31+
# Code quality
32+
dotnet_code_quality_unused_parameters = all:warning
33+
dotnet_remove_unnecessary_suppression_exclusions = none:warning

0 commit comments

Comments
 (0)