generated from havit/NewProjectTemplate-Blazor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.editorconfig
114 lines (85 loc) · 3.67 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
107
108
109
110
111
112
113
114
# ALL FILES
[*]
end_of_line = CRLF
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
# C# files
[*.cs]
####################################
# Core EditorConfig Options #
####################################
# Indentation and spacing
indent_style = tab
####################################
# .NET Coding Conventions #
####################################
# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
# Modifier preferences
dotnet_style_readonly_field = true:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
####################################
# C# Coding Conventions #
####################################
# var preferences
csharp_style_var_elsewhere = false:silent
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = false:silent
# Pattern matching preferences ???
csharp_style_prefer_switch_expression = true:suggestion
# Code-block preferences
csharp_prefer_braces = true:warning
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:warning
csharp_style_namespace_declarations=file_scoped:suggestion
####################################
# C# Formatting Rules #
####################################
## Indentation preferences
csharp_indent_block_contents = true:warning
#csharp_indent_braces = false
#csharp_indent_case_contents_when_block = true
#csharp_indent_labels = one_less_than_current
####################################
# Naming Conventions #
####################################
#Default rules apply! (IDE1006 severity makes them mandatory) https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/naming-rules#default-naming-styles
###############################
#### IDE analyzers options ####
###############################
dotnet_diagnostic.IDE0009.severity = warning # Member access should be qualified
dotnet_diagnostic.IDE0011.severity = warning # Add braces
dotnet_diagnostic.IDE0035.severity = warning # Unreachable code detected
dotnet_diagnostic.IDE0040.severity = warning # Use accessibility modifiers
dotnet_diagnostic.IDE0048.severity = warning # Add parenthesis for clarity
dotnet_diagnostic.IDE0055.severity = warning # Fix formating
dotnet_diagnostic.IDE0065.severity = warning # Misplaced using directive
dotnet_diagnostic.IDE1006.severity = warning # Naming Styles
#### FxCop analyzers options ####
# Adopted from:
# \\topol.havit.local\Library\VS2019\CodeAnalysis\HavitMain.ruleset
dotnet_diagnostic.CA1010.severity=warning
dotnet_diagnostic.CA1012.severity=warning
dotnet_diagnostic.CA1013.severity=warning
dotnet_diagnostic.CA1016.severity=warning
dotnet_diagnostic.CA1041.severity=warning
dotnet_diagnostic.CA1044.severity=warning
dotnet_diagnostic.CA1047.severity=warning
dotnet_diagnostic.CA1048.severity=warning
dotnet_diagnostic.CA1049.severity=warning
dotnet_diagnostic.CA1050.severity=warning
dotnet_diagnostic.CA1064.severity=warning
dotnet_diagnostic.CA1065.severity=warning
# CA1303: Method '{1}' passes a literal string as parameter '{1}' of a call to '{2}'. Retrieve the following string(s) from a resource table instead: "{3}"
#dotnet_diagnostic.CA1303.severity=silent
dotnet_diagnostic.CA1500.severity=warning
dotnet_diagnostic.CA1504.severity=warning
# CA1822: Member '{0}' does not access instance data and can be marked as static
dotnet_diagnostic.CA1822.severity=none
# CA2016: Forward the CancellationToken parameter to methods that take one
dotnet_diagnostic.CA2016.severity = warning
[*/Migrations/*.cs]
generated_code=true