File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments