This repository was archived by the owner on Mar 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy path.editorconfig
137 lines (95 loc) · 3.86 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Suppress: EC112
root = true
[*]
charset = utf-8
end_of_line = crlf
indent_style = space
trim_trailing_whitespace = true
### listing of Code Analysis codes: https://docs.microsoft.com/en-us/visualstudio/code-quality/code-analysis-warnings-for-managed-code-by-checkid?view=vs-2015
### Managing Disposable types
# CA1001: Types that own disposable fields should be disposable
dotnet_diagnostic.CA1001.severity = error
# CA1049: Types that own native resources should be disposable
dotnet_diagnostic.CA1049.severity = error
# CA1050: Declare types in namespaces
dotnet_diagnostic.CA1050.severity = error
# CA1063: Implement IDisposable correctly
dotnet_diagnostic.CA1063.severity = error
# CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1816.severity = error
# CA2000: Dispose objects before losing scope
dotnet_diagnostic.CA2000.severity = error
# CA2202: Do not dispose objects multiple times
dotnet_diagnostic.CA2202.severity = warning
# CA2213: Disposable fields should be disposed
dotnet_diagnostic.CA2213.severity = warning
# CA2215: Dispose methods should call base class dispose
dotnet_diagnostic.CA2215.severity = warning
# CA2216: Disposable types should declare finalizer
dotnet_diagnostic.CA2216.severity = error
### Other
# CA1010: Collections should implement generic interface
dotnet_diagnostic.CA1010.severity = silent
# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = silent
# CA1034: Nested types should not be visible
dotnet_diagnostic.CA1034.severity = silent
# CA1040: Avoid empty interfaces
dotnet_diagnostic.CA1040.severity = none
# CA1303: Do not pass literals as localized parameters
dotnet_diagnostic.CA1303.severity = silent
# CA1307: Specify StringComparison
dotnet_diagnostic.CA1307.severity = error
# CA1308: Normalize strings to uppercase
dotnet_diagnostic.CA1308.severity = none
# CA1707: Identifiers should not contain underscores
dotnet_diagnostic.CA1707.severity = none
# CA1710: Identifiers should have correct suffix
dotnet_diagnostic.CA1710.severity = none
# CA1715: Identifiers should have correct prefix
dotnet_diagnostic.CA1715.severity = none
# CA1720: Identifier contains type name
dotnet_diagnostic.CA1720.severity = none
# CA1724: Type names should not match namespaces
dotnet_diagnostic.CA1724.severity = none
# CA1814: Prefer jagged arrays over multidimensional
dotnet_diagnostic.CA1814.severity = silent
# CA1819: Properties should not return arrays
dotnet_diagnostic.CA1819.severity = suggestion
# CA2225: Operator overloads have named alternates
dotnet_diagnostic.CA2225.severity = silent
# RCS1079: Throwing of new NotImplementedException.
dotnet_diagnostic.RCS1079.severity = silent
# IDE0025: Use block body for properties
csharp_style_expression_bodied_properties = when_on_single_line : warning
# IDE0048: add parentheses for clarity
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:silent
# RS0016: Add public types and members to the declared API
dotnet_diagnostic.RS0016.severity = silent
# C# prefs
[*.cs]
csharp_indent_case_contents = false
csharp_prefer_braces = true : suggestion
# Use tabs for solution files.
[*.sln]
indent_style = tab
# Code files
[*.{js,cs,csx,vb,vbx,c,cpp,h,hpp,glsl,hlsl}]
indent_size = 4
# Script files
[*.{fs,py,ss}]
indent_size = 2
# Shell files
[*.{cmd,bat,ps1,sh}]
indent_size = 4
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# JSON/YAML files
[*.{json,yml,yaml}]
indent_size = 2