-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutoCodeFormat.targets
More file actions
43 lines (37 loc) · 1.75 KB
/
AutoCodeFormat.targets
File metadata and controls
43 lines (37 loc) · 1.75 KB
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
<Project>
<ItemGroup>
<!-- <PackageReference Include="DarkPatterns.Build.Autoformat" Version="0.2.0" PrivateAssets="All" /> -->
</ItemGroup>
<PropertyGroup>
<CodeAnalysisTreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</CodeAnalysisTreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
<WarningsAsErrors Condition=" '$(Configuration)' == 'Release' " />
<!--
CA1067 - should override Equals (but records already override equals)
CA1852 - seal internal types
CA1304 - specify CultureInfo
CA1305 - specify IFormatProvider
CA1310 - specify StringComparison for correctness (TODO: may want to fix this)
CA1311 - specify a culture or use invariant
CA1707 - assembly/namespace naming
CA1716 - identifiers should not match keywords - Optional matched a keyword...
CA1805 - do not initialize unnecessarily
-->
<NoWarn>$(NoWarn),CA1067,CA1852,CA1304,CA1305,CA1311,CA1707,CA1310,CA1716,CA1805</NoWarn>
<!-- CS9057 - Visual Studio is finding a different version of analyzers; this will allow builds in VS. -->
<NoWarn>$(NoWarn),CS9057</NoWarn>
<!--
test project supressions:
CA1711 - "Collection" refers to xunit test collections
CA2016 - Cancellation token
CA1806 - expanding enumerable causes side effects
CA1822 - can be marked as static
CA1816 - finalizer suppression
CA1861 - Prefer 'static readonly' fields over constant array arguments
-->
<NoWarn Condition=" $(AssemblyName.EndsWith('.Test')) ">$(NoWarn),CA1711,CA2016,CA1806,CA1822,CA1816,CA1861</NoWarn>
</PropertyGroup>
<Target Name="PrepareLint" />
</Project>