Skip to content

Commit 3c71c26

Browse files
committed
Add editor config & C# conventions
This retires R# settings files.
1 parent cb66f77 commit 3c71c26

File tree

2 files changed

+56
-13
lines changed

2 files changed

+56
-13
lines changed

.editorconfig

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# http://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
11+
indent_size = 2
12+
13+
[*.{sln}]
14+
indent_style = tab
15+
16+
[*.{json,yml}]
17+
indent_size = 2
18+
19+
[*.{cs,tt,sql}]
20+
charset = utf-8
21+
indent_style = space
22+
indent_size = 4
23+
max_line_length = 100
24+
25+
[*.cs]
26+
# Prefer "var" everywhere
27+
csharp_style_var_for_built_in_types = true:suggestion
28+
csharp_style_var_when_type_is_apparent = true:suggestion
29+
csharp_style_var_elsewhere = true:suggestion
30+
31+
# Prefer method-like constructs to have a block body
32+
csharp_style_expression_bodied_methods = false:none
33+
csharp_style_expression_bodied_constructors = false:none
34+
csharp_style_expression_bodied_operators = false:none
35+
36+
# Prefer property-like constructs to have an expression-body
37+
csharp_style_expression_bodied_properties = true:none
38+
csharp_style_expression_bodied_indexers = true:none
39+
csharp_style_expression_bodied_accessors = true:none
40+
41+
# Suggest more modern language features when available
42+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
43+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
44+
csharp_style_inlined_variable_declaration = true:suggestion
45+
csharp_style_throw_expression = true:suggestion
46+
csharp_style_conditional_delegate_call = true:suggestion
47+
csharp_prefer_simple_default_expression = true:suggestion
48+
49+
# Spacing
50+
csharp_space_after_cast = true
51+
csharp_space_after_keywords_in_control_flow_statements = true
52+
csharp_space_between_method_declaration_parameter_list_parentheses = false
53+
54+
# Wrapping
55+
csharp_preserve_single_line_statements = true
56+
csharp_preserve_single_line_blocks = true

Elmah.SqlServer.DotSettings

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)