-
-
Notifications
You must be signed in to change notification settings - Fork 254
/
.editorconfig
106 lines (81 loc) · 4.93 KB
/
.editorconfig
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
root = true
[*]
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
[*.{xml,csproj,props,targets,config}]
indent_size = 2
[*.json]
indent_size = 2
[*.yml]
indent_size = 2
[*.cs]
indent_size = 4
# Style I care about
csharp_style_expression_bodied_constructors = false
csharp_prefer_braces = true
dotnet_sort_system_directives_first = true
csharp_using_directive_placement = outside_namespace
# Stuff that is usually best
csharp_style_inlined_variable_declaration = true
csharp_style_var_elsewhere = true
csharp_space_after_cast = false
csharp_style_pattern_matching_over_as_with_null_check = true
csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_indent_case_contents = true
csharp_new_line_before_open_brace = all
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current
csharp_prefer_simple_default_expression = true
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
# Good defaults, but not always
dotnet_style_object_initializer = true
csharp_style_expression_bodied_indexers = true
csharp_style_expression_bodied_accessors = true
csharp_style_throw_expression = true
# Default severity for analyzer diagnostics with category 'Style' (escalated to build warnings)
# dotnet_analyzer_diagnostic.category-Style.severity = suggestion
# Required naming style
dotnet_diagnostic.IDE0006.severity = error
# suppress warning aboud unused methods
dotnet_diagnostic.IDE0051.severity = none
# Missing required header
dotnet_diagnostic.IDE0073.severity = error
# Remove unnecessary parenthesis
dotnet_diagnostic.IDE0047.severity = warning
# Parenthesis added for clarity
dotnet_diagnostic.IDE0048.severity = warning
# Naming styles
## Constants are PascalCase
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_symbols.const.applicable_kinds = field, property
dotnet_naming_symbols.const.applicable_accessibilities = *
dotnet_naming_symbols.const.required_modifiers = const
dotnet_naming_rule.constants_should_be_pascale_case.symbols = const
dotnet_naming_rule.constants_should_be_pascale_case.style = pascal_case
dotnet_naming_rule.constants_should_be_pascale_case.severity = error
## Private static fields start with s_
dotnet_naming_style.s_underscore_camel_case.required_prefix = s_
dotnet_naming_style.s_underscore_camel_case.capitalization = camel_case
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private
dotnet_naming_symbols.private_static_fields.required_modifiers = static
dotnet_naming_rule.private_static_fields_should_be_underscore.symbols = private_static_fields
dotnet_naming_rule.private_static_fields_should_be_underscore.style = s_underscore_camel_case
dotnet_naming_rule.private_static_fields_should_be_underscore.severity = error
## Private fields are _camelCase
dotnet_naming_style.underscore_camel_case.required_prefix = _
dotnet_naming_style.underscore_camel_case.capitalization = camel_case
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_rule.private_fields_should_be_underscore.symbols = private_fields
dotnet_naming_rule.private_fields_should_be_underscore.style = underscore_camel_case
dotnet_naming_rule.private_fields_should_be_underscore.severity = error
# File header
file_header_template = Copyright (c) Nate McMaster.\nLicensed under the Apache License, Version 2.0. See License.txt in the project root for license information.