Skip to content

Commit d18c5ef

Browse files
committed
Update to .NET Core 2.2
1 parent 9ff8a94 commit d18c5ef

7 files changed

Lines changed: 204 additions & 17 deletions

File tree

Directory.Build.targets

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
23
<PropertyGroup>
34
<Authors>Ian Qvist</Authors>
45
<Copyright>Copyright 2020, by Ian Qvist. All rights reserved.</Copyright>
56
<Description>A C# port of the simple integer compression library JavaFastPFOR by Daniel Lemire</Description>
67
<Version>1.0.0</Version>
78

9+
<!-- Set copying files etc. to timeout faster -->
10+
<CopyRetryCount>2</CopyRetryCount>
11+
<CopyRetryDelayMilliseconds>500</CopyRetryDelayMilliseconds>
12+
813
<LangVersion>8.0</LangVersion>
914
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
1015
<DebugType>portable</DebugType>
@@ -21,7 +26,6 @@
2126
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2227
<IncludeSymbols>true</IncludeSymbols>
2328
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
24-
2529
</PropertyGroup>
2630

2731
<ItemGroup>
@@ -33,4 +37,14 @@
3337
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="4.0.0" PrivateAssets="all" />
3438
</ItemGroup>
3539

40+
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
41+
<GenerateDocumentationFile>false</GenerateDocumentationFile>
42+
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
43+
</PropertyGroup>
44+
45+
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
46+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
47+
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
48+
</PropertyGroup>
49+
3650
</Project>

Global.ruleset

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="16.0">
3+
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
4+
<Name Resource="MinimumRecommendedRules_Name" />
5+
<Description Resource="MinimumRecommendedRules_Description" />
6+
</Localization>
7+
<Rules AnalyzerId="IDisposableAnalyzers" RuleNamespace="IDisposableAnalyzers">
8+
<Rule Id="IDISP013" Action="Error" />
9+
<Rule Id="IDISP014" Action="None" />
10+
</Rules>
11+
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
12+
<Rule Id="CA1001" Action="Warning" />
13+
<Rule Id="CA1009" Action="Warning" />
14+
<Rule Id="CA1016" Action="Warning" />
15+
<Rule Id="CA1033" Action="Warning" />
16+
<Rule Id="CA1049" Action="Warning" />
17+
<Rule Id="CA1060" Action="Warning" />
18+
<Rule Id="CA1061" Action="Warning" />
19+
<Rule Id="CA1063" Action="Warning" />
20+
<Rule Id="CA1065" Action="Warning" />
21+
<Rule Id="CA1301" Action="Warning" />
22+
<Rule Id="CA1400" Action="Warning" />
23+
<Rule Id="CA1401" Action="Warning" />
24+
<Rule Id="CA1403" Action="Warning" />
25+
<Rule Id="CA1404" Action="Warning" />
26+
<Rule Id="CA1405" Action="Warning" />
27+
<Rule Id="CA1410" Action="Warning" />
28+
<Rule Id="CA1415" Action="Warning" />
29+
<Rule Id="CA1900" Action="Warning" />
30+
<Rule Id="CA1901" Action="Warning" />
31+
<Rule Id="CA2002" Action="Warning" />
32+
<Rule Id="CA2100" Action="Warning" />
33+
<Rule Id="CA2101" Action="Warning" />
34+
<Rule Id="CA2108" Action="Warning" />
35+
<Rule Id="CA2111" Action="Warning" />
36+
<Rule Id="CA2112" Action="Warning" />
37+
<Rule Id="CA2114" Action="Warning" />
38+
<Rule Id="CA2116" Action="Warning" />
39+
<Rule Id="CA2117" Action="Warning" />
40+
<Rule Id="CA2122" Action="Warning" />
41+
<Rule Id="CA2123" Action="Warning" />
42+
<Rule Id="CA2124" Action="Warning" />
43+
<Rule Id="CA2126" Action="Warning" />
44+
<Rule Id="CA2131" Action="Warning" />
45+
<Rule Id="CA2132" Action="Warning" />
46+
<Rule Id="CA2133" Action="Warning" />
47+
<Rule Id="CA2134" Action="Warning" />
48+
<Rule Id="CA2137" Action="Warning" />
49+
<Rule Id="CA2138" Action="Warning" />
50+
<Rule Id="CA2140" Action="Warning" />
51+
<Rule Id="CA2141" Action="Warning" />
52+
<Rule Id="CA2146" Action="Warning" />
53+
<Rule Id="CA2147" Action="Warning" />
54+
<Rule Id="CA2149" Action="Warning" />
55+
<Rule Id="CA2200" Action="Error" />
56+
<Rule Id="CA2202" Action="Warning" />
57+
<Rule Id="CA2207" Action="Warning" />
58+
<Rule Id="CA2212" Action="Warning" />
59+
<Rule Id="CA2213" Action="Warning" />
60+
<Rule Id="CA2214" Action="Warning" />
61+
<Rule Id="CA2216" Action="Warning" />
62+
<Rule Id="CA2220" Action="Warning" />
63+
<Rule Id="CA2229" Action="Warning" />
64+
<Rule Id="CA2231" Action="Warning" />
65+
<Rule Id="CA2232" Action="Warning" />
66+
<Rule Id="CA2235" Action="Warning" />
67+
<Rule Id="CA2236" Action="Warning" />
68+
<Rule Id="CA2237" Action="Warning" />
69+
<Rule Id="CA2238" Action="Warning" />
70+
<Rule Id="CA2240" Action="Warning" />
71+
<Rule Id="CA2241" Action="Warning" />
72+
<Rule Id="CA2242" Action="Warning" />
73+
</Rules>
74+
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
75+
<Rule Id="CA1012" Action="Error" />
76+
<Rule Id="CA1018" Action="Error" />
77+
<Rule Id="CA1027" Action="Error" />
78+
<Rule Id="CA1028" Action="None" />
79+
<Rule Id="CA1031" Action="None" />
80+
<Rule Id="CA1040" Action="Info" />
81+
<Rule Id="CA1041" Action="Error" />
82+
<Rule Id="CA1054" Action="None" />
83+
<Rule Id="CA1707" Action="None" />
84+
<Rule Id="CA1710" Action="None" />
85+
<Rule Id="CA1712" Action="Info" />
86+
<Rule Id="CA1716" Action="None" />
87+
<Rule Id="CA1720" Action="None" />
88+
<Rule Id="CA1724" Action="None" />
89+
<Rule Id="CA1819" Action="None" />
90+
<Rule Id="CA2007" Action="None" />
91+
<Rule Id="CA2227" Action="None" />
92+
</Rules>
93+
<Rules AnalyzerId="Microsoft.CodeQuality.CSharp.Analyzers" RuleNamespace="Microsoft.CodeQuality.CSharp.Analyzers">
94+
<Rule Id="Async001" Action="Error" />
95+
<Rule Id="Async002" Action="Error" />
96+
<Rule Id="CA1032" Action="None" />
97+
<Rule Id="CA1507" Action="Error" />
98+
<Rule Id="CA1821" Action="None" />
99+
<Rule Id="CA2200" Action="Error" />
100+
</Rules>
101+
<Rules AnalyzerId="Microsoft.DotNet.Analyzers.Compatibility" RuleNamespace="Microsoft.DotNet.Analyzers.Compatibility">
102+
<Rule Id="DE0001" Action="Error" />
103+
<Rule Id="DE0002" Action="Error" />
104+
<Rule Id="DE0003" Action="Error" />
105+
<Rule Id="DE0004" Action="Error" />
106+
<Rule Id="DE0006" Action="Error" />
107+
<Rule Id="DE0007" Action="Error" />
108+
<Rule Id="DE0008" Action="Error" />
109+
<Rule Id="DE0009" Action="Error" />
110+
<Rule Id="PC001" Action="None" />
111+
<Rule Id="PC002" Action="Info" />
112+
<Rule Id="PC003" Action="None" />
113+
</Rules>
114+
<Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers">
115+
<Rule Id="CA1303" Action="None" />
116+
<Rule Id="CA1308" Action="None" />
117+
<Rule Id="CA1813" Action="Error" />
118+
<Rule Id="CA1816" Action="Error" />
119+
<Rule Id="CA2009" Action="Error" />
120+
<Rule Id="CA5351" Action="None" />
121+
</Rules>
122+
<Rules AnalyzerId="Microsoft.NetCore.CSharp.Analyzers" RuleNamespace="Microsoft.NetCore.CSharp.Analyzers">
123+
<Rule Id="CA1825" Action="Error" />
124+
</Rules>
125+
<Rules AnalyzerId="Roslynator.CSharp.Analyzers" RuleNamespace="Roslynator.CSharp.Analyzers">
126+
<Rule Id="RCS1015" Action="Warning" />
127+
<Rule Id="RCS1025" Action="Error" />
128+
<Rule Id="RCS1042" Action="Error" />
129+
<Rule Id="RCS1043" Action="Error" />
130+
<Rule Id="RCS1044" Action="Error" />
131+
<Rule Id="RCS1046" Action="Info" />
132+
<Rule Id="RCS1047" Action="None" />
133+
<Rule Id="RCS1052" Action="Error" />
134+
<Rule Id="RCS1062" Action="Error" />
135+
<Rule Id="RCS1066" Action="Error" />
136+
<Rule Id="RCS1075" Action="None" />
137+
<Rule Id="RCS1079" Action="Error" />
138+
<Rule Id="RCS1090" Action="None" />
139+
<Rule Id="RCS1093" Action="Warning" />
140+
<Rule Id="RCS1096" Action="None" />
141+
<Rule Id="RCS1097" Action="Error" />
142+
<Rule Id="RCS1102" Action="None" />
143+
<Rule Id="RCS1105" Action="Error" />
144+
<Rule Id="RCS1106" Action="Error" />
145+
<Rule Id="RCS1107" Action="Error" />
146+
<Rule Id="RCS1124" Action="None" />
147+
<Rule Id="RCS1124FadeOut" Action="None" />
148+
<Rule Id="RCS1130" Action="Error" />
149+
<Rule Id="RCS1141" Action="None" />
150+
<Rule Id="RCS1155" Action="Error" />
151+
<Rule Id="RCS1161" Action="None" />
152+
<Rule Id="RCS1163" Action="None" />
153+
<Rule Id="RCS1174" Action="Error" />
154+
<Rule Id="RCS1194" Action="None" />
155+
<Rule Id="RCS1203" Action="Error" />
156+
<Rule Id="RCS1210" Action="Error" />
157+
<Rule Id="RCS1214" Action="Warning" />
158+
</Rules>
159+
<Rules AnalyzerId="SecurityCodeScan" RuleNamespace="SecurityCodeScan">
160+
<Rule Id="Debug" Action="None" />
161+
</Rules>
162+
<Rules AnalyzerId="SerilogAnalyzer" RuleNamespace="SerilogAnalyzer">
163+
<Rule Id="Serilog001" Action="Error" />
164+
</Rules>
165+
</RuleSet>

src/CSharpFastPFOR.Benchmarks/BenchmarkCSV.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ namespace Genbox.CSharpFastPFOR.Benchmarks
1515
{
1616
public enum Format
1717
{
18-
ONEARRAYPERLINE, ONEARRAYPERFILE, ONEINTPERLINE
18+
ONEARRAYPERLINE,
19+
ONEARRAYPERFILE,
20+
ONEINTPERLINE
1921
}
2022

2123
public enum CompressionMode
2224
{
23-
AS_IS, DELTA
25+
AS_IS,
26+
DELTA
2427
}
2528

2629
public static class BenchmarkCSV
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
<Packable>false</Packable>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>netcoreapp2.2</TargetFramework>
6+
<IsPackable>false</IsPackable>
67
</PropertyGroup>
78

89
<ItemGroup>
910
<ProjectReference Include="..\CSharpFastPFOR\CSharpFastPFOR.csproj" />
1011
</ItemGroup>
1112

12-
</Project>
13+
</Project>
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
<Packable>false</Packable>
4+
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<ProjectReference Include="..\CSharpFastPFOR\CSharpFastPFOR.csproj" />
9+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
10+
<PackageReference Include="xunit" Version="2.4.1" />
11+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
12+
<PrivateAssets>all</PrivateAssets>
13+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
14+
</PackageReference>
1015
</ItemGroup>
1116

1217
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
14-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
15-
<PackageReference Include="xunit" Version="2.4.1" />
18+
<ProjectReference Include="..\CSharpFastPFOR\CSharpFastPFOR.csproj" />
1619
</ItemGroup>
1720

18-
</Project>
21+
</Project>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
4+
<OutputType>Library</OutputType>
5+
<TargetFramework>netstandard2.0</TargetFramework>
56
</PropertyGroup>
67

78
</Project>

src/CSharpFastPFOR/Port/Arrays.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ private static void rangeCheck(int arrayLen, int fromIndex, int toIndex)
1111
throw new ArgumentOutOfRangeException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")");
1212

1313
if (fromIndex < 0)
14-
throw new ArgumentOutOfRangeException("fromIndex");
14+
throw new ArgumentOutOfRangeException(nameof(fromIndex));
1515

1616
if (toIndex > arrayLen)
17-
throw new ArgumentOutOfRangeException("toIndex");
17+
throw new ArgumentOutOfRangeException(nameof(toIndex));
1818
}
1919

2020
public static void fill<T>(T[] array, int start, int end, T value)
2121
{
2222
if (array == null)
23-
throw new ArgumentNullException("array");
23+
throw new ArgumentNullException(nameof(array));
2424

2525
rangeCheck(array.Length, start, end);
2626

0 commit comments

Comments
 (0)