-
Notifications
You must be signed in to change notification settings - Fork 2
/
.editorconfig
85 lines (67 loc) · 2.2 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
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# All files
[*]
# Unix-style newlines with a newline ending every file
indent_style = space
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
# Spell checker configuration
spelling_exclusion_path = .\.spellcheckignore
# Code files
[*.xaml]
indent_size = 4
[*.ps1]
indent_size = 2
# Xml project files
[*.{csproj,proj,projitems,shproj,sfproj}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec}]
indent_size = 2
# JSON files
[*.{json,yaml,yml}]
indent_size = 2
# Xml files
[*.xml]
indent_size = 2
# C# files
[*.{cs,csx}]
# Indentation and spacing
indent_size = 4
tab_width = 4
insert_final_newline = true
dotnet_sort_system_directives_first = true
# Import namespaces per file
csharp_using_directive_placement = outside_namespace:error
# Use namespace per file
csharp_style_namespace_declarations = file_scoped:warning
# No need to match folder structure. Use 'Sync Namespaces' if you must.
dotnet_style_namespace_match_folder = false
# Use int x = .. over Int32
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
# Use int.MaxValue over Int32.MaxValue
dotnet_style_predefined_type_for_member_access = true:suggestion
csharp_prefer_simple_default_expression = true:warning
# Never use var
csharp_style_var_for_built_in_types = false:warning
# Use x is null .. over x = null
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
# Always use accessibility, except for interface member
dotnet_style_require_accessibility_modifiers = for_non_interace_members:error
# Braces settings
csharp_prefer_braces = true
# Newline preference
insert_final_newline = true
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
# Never pad unnecessary blank lines
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
# CA2016: Forward the 'CancellationToken' parameter to methods that take one
dotnet_diagnostic.CA2016.severity = suggestion