-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
203 lines (176 loc) · 11.3 KB
/
Directory.Build.props
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>preview</LangVersion>
<OutputType>Library</OutputType>
<!-- Debug -->
<DebugType>portable</DebugType>
<CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages>
<!-- GitVersion -->
<GitVersion_NoFetchEnabled>true</GitVersion_NoFetchEnabled>
<GitVersionTargetFramework>net9.0</GitVersionTargetFramework>
<!-- Nuget -->
<NuGetAudit>true</NuGetAudit>
<NuGetAuditLevel>low</NuGetAuditLevel>
<NuGetAuditMode>all</NuGetAuditMode>
<!-- Misc -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PublishReferencesDocumentationFiles>false</PublishReferencesDocumentationFiles>
<ApiCompatStrictMode>true</ApiCompatStrictMode>
<ApiCompatValidateAssemblies>true</ApiCompatValidateAssemblies>
<EnablePackageValidation>true</EnablePackageValidation>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<!-- Lint -->
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<Features>strict</Features>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>preview</AnalysisLevel>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>All</AnalysisMode>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<NoWarn>$(NoWarn);
CS1591; <!--Missing XML comment for publicly visible type or member-->
CA1000; <!--Do not declare static members on generic types-->
CA1002; <!--Change 'List ' to use 'Collection ', 'ReadOnlyCollection ' or 'KeyedCollection'-->
CA1003; <!--Use generic event handler instances-->
CA1005; <!-- Consider a design where X has no more than 2 type parameters-->
CA1008; <!--Enums should have zero value-->
CA1028; <!--Enum storage should be Int32-->
CA1032; <!--Implement standard exception constructors-->
CA1034; <!--Do not nest type. Alternatively, change its accessibility so that it is not externally visible.-->
CA1054; <!--Change the type of parameter 'url' of method from 'string' to 'System.Uri', or provide an overload that allows 'url' to be passed as a 'System.Uri' object-->
CA1055; <!--Change the return type of method from 'string' to 'System.Uri'-->
CA1056; <!--URI properties should not be strings-->
CA1062; <!--Validate arguments of public methods-->
CA1707; <!--Remove the underscores from member name-->
CA1819; <!-- Properties should not return arrays-->
CA1849; <!--synchronously blocks. Await instead. -->
CA2007; <!--Consider calling ConfigureAwait on the awaited task -->
CA2234; <!--Pass System.Uri objects instead of strings-->
EA0002; <!--Use 'System.TimeProvider' to make the code easier to test-->
EA0014; <!--Add CancellationToken as the parameter of asynchronous method-->
MA0004; <!--Use Task.ConfigureAwait(false) as the current SynchronizationContext is not needed-->
MA0016; <!--Prefer returning collection abstraction instead of implementation-->
MA0018; <!--Do not declare static members on generic types-->
MA0023; <!--Add RegexOptions.ExplicitCapture-->
MA0026; <!--Fix TODO comment-->
MA0038; <!--Make method static (deprecated, use CA1822 instead)-->
MA0042; <!--Do not use blocking calls in an async method-->
MA0046; <!--Use EventHandler<T> to declare events-->
MA0051; <!--Method is too long-->
MA0099; <!-- Use Explicit enum value instead of 0 -->
MA0136; <!-- Raw String contains an implicit end of line character-->
IDE0010; <!--Add missing cases to switch statement-->
IDE0022; <!--Use expression body for methods-->
IDE0024; <!--Use expression body for operators-->
IDE0058; <!--Remove unnecessary expression value-->
IDE0061; <!--Use expression body for local functions-->
IDE0160; <!--Namespace declaration preferences-->
S107; <!--Method has parameters, which is greater than the 7 authorized. -->
S1067; <!--Reduce the number of conditional operators used in the expression (maximum allowed 3).-->
S1075; <!--Refactor your code not to use hardcoded absolute paths or URIs.-->
S1133; <!--Do not forget to remove this deprecated code someday. -->
S1244; <!--Do not check floating point inequality with exact values, use a range instead.-->
S1994; <!--This loop's stop condition tests 'X' but the incrementer updates 'Y'.-->
S2139; <!--Either log this exception and handle it, or rethrow it with some contextual information.-->
S2302; <!--Replace the string 'param' with 'nameof(param)'-->
S2326; <!--'T' is not used in the interface.-->
S2743; <!-- Static fields should not be used in generic types-->
S3236; <!--Remove this argument from the method call; it hides the caller information.-->
S3908; <!--Refactor this delegate to use 'System.EventHandler<TEventArgs>'. -->
S3995; <!-- Change this return type to 'System.Uri'. -->
S3996; <!--Change this property type to 'System.Uri'. -->
S4022; <!--Change this enum storage to 'Int32'-->
S6966; <!--Awaitable method should be used-->
SA1010; <!--Opening square brackets should not be preceded by a space-->
SA1122; <!--Use string.Empty for empty strings -->
SA1116; <!--The parameters should begin on the line after the declaration, whenever the parameter span across multiple lines-->
SA1117; <!-- The parameters should all be placed on the same line or each parameter should be placed on its own line-->
SA1200; <!--Using directive should appear within a namespace declaration-->
SA1201; <!--A constructor should not follow a property -->
SA1202; <!--'public' members should come before 'private' members -->
SA1300; <!--Element should begin with an uppercase letter -->
SA1309; <!--Field should not begin with an underscore-->
SA1313; <!--Parameter should begin with lower-case letter-->
SA1402; <!--File may only contain a single type -->
SA1515; <!--Single-line comment should be preceded by blank line-->
SA1600; <!--Elements should be documented -->
SA1601; <!-- Partial elements should be documented -->
SA1602; <!--Enumeration items should be documented-->
SA1604; <!--Element documentation should have summary -->
SA1615; <!--Element return value should be documented -->
SA1633; <!--The file header XML is invalid.-->
SA1649; <!-- File name should match first type name -->
RCS1031; <!-- Remove unnecessary braces. -->
RCS1135; <!-- Declare enum member with zero value (when enum has FlagsAttribute).-->
RCS1139; <!-- Add summary element to documentation comment.-->
RCS1141; <!--Add 'param' element to documentation comment-->
RCS1158; <!--Static member in generic type should use a type parameter-->
RCS1181; <!--Convert comment to documentation comment.-->
RCS1194; <!--Implement exception constructors.-->
VSTHRD111; <!--Add .ConfigureAwait(bool) to your await expression-->
AsyncFixer02; <!--ToArrayAsync should be used instead of -->
</NoWarn>
<WarningsNotAsErrors>
MA0048; <!--File name must match type name-->
S125; <!--Remove this commented out code.-->
S1135; <!--Complete the task associated to this 'TODO' comment.-->
IDE0032; <!-- Use auto property-->
</WarningsNotAsErrors>
</PropertyGroup>
<Choose>
<When Condition="'$(Configuration)' == 'Debug'">
<PropertyGroup>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<WarningsNotAsErrors>$(WarningsNotAsErrors);
CA1031; <!--Modify to catch a more specific allowed exception type, or rethrow the exception-->
CA1822;
CA2201; <!--Exception type System.Exception is not sufficiently specific-->
CS0168; <!--The variable is declared but never used-->
CS9113; <!--Parameter is unread. -->
ERP022; <!--An exit point swallows an unobserved exception-->
IDE0005; <!--Using directive is unnecessary.-->
IDE0009; <!--Add 'this' or 'Me' qualification-->
IDE0051; <!--Private member is unused-->
IDE0060; <!--Remove unused parameter -->
S112; <!--'System.Exception' should not be thrown by user code.-->
S125; <!--Remove this commented out code.-->
S3235; <!--Remove these redundant parentheses.-->
S1144; <!--Remove the unused private method-->
S1172; <!--Remove this unused method parameter-->
RCS1163; <!--Unused parameter-->
RCS1188; <!--Remove redundant auto-property initialization-->
RCS1213; <!--Remove unused method declaration-->
SA1005; <!--Single line comment should begin with a space-->
SA1027; <!--Tabs and spaces should be used correctly-->
SA1101; <!--Prefix local calls with this-->
SA1404; <!--Code analysis suppression should have justification-->
SA1413; <!--Use trailing comma in multi-line initializers-->
SA1512; <!--Single-line comments should not be followed by blank line-->
MA0007; <!--Add comma after the last value-->
NU1901; <!-- Package has a known low severity vulnerability -->
NU1902; <!-- Package has a known low moderate vulnerability -->
NU1903; <!-- Package has a known low high vulnerability -->
NU1904; <!-- Package has a known low critical vulnerability -->
</WarningsNotAsErrors>
</PropertyGroup>
</When>
</Choose>
<ItemDefinitionGroup>
<PackageReference>
<PrivateAssets>contentfiles;analyzers;build;compile</PrivateAssets>
</PackageReference>
<ProjectReference>
<PrivateAssets>contentfiles;analyzers;build;compile</PrivateAssets>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<AssemblyAttribute Include="System.CLSCompliantAttribute">
<_Parameter1>false</_Parameter1>
</AssemblyAttribute>
<AdditionalFiles Include="$(ProjectDir)../../BannedSymbols.txt" />
</ItemGroup>
</Project>