Skip to content

Commit 39c5e4e

Browse files
committed
Update project to latest template
1 parent 7751ef6 commit 39c5e4e

File tree

71 files changed

+5809
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+5809
-123
lines changed

.editorconfig

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,12 @@ indent_style = space
3232
indent_size = 4
3333
tab_width = 4
3434

35-
# Verify
36-
[*.{received,verified}.{txt}]
37-
charset = "utf-8-bom"
38-
end_of_line = lf
39-
indent_size = unset
40-
indent_style = unset
41-
insert_final_newline = false
42-
tab_width = unset
43-
trim_trailing_whitespace = false
44-
4535
# Analyzer settings
4636
roslynator_accessibility_modifiers = explicit
4737
roslynator_enum_has_flag_style = method
4838
roslynator_object_creation_type_style = explicit
4939
roslynator_use_var_instead_of_implicit_object_creation = false
5040
csharp_style_namespace_declarations = file_scoped:error
51-
dotnet_public_api_analyzer.require_api_files = true # Disable the requirement for projects to have a PublicAPI.Shipped.txt file
5241

5342
# Csharp styles
5443
csharp_new_line_before_members_in_object_initializers = false
@@ -113,4 +102,14 @@ resharper_xmldoc_keep_user_linebreaks = true
113102
resharper_parentheses_non_obvious_operations = none, multiplicative, additive, arithmetic, shift, bitwise_and, bitwise_exclusive_or, bitwise_inclusive_or, bitwise
114103

115104
# Microsoft .NET properties
116-
csharp_style_var_for_built_in_types = false:suggestion
105+
csharp_style_var_for_built_in_types = false:suggestion
106+
107+
# Verify settings
108+
[*.{received,verified}.{json,txt,xml}]
109+
charset = utf-8-bom
110+
end_of_line = lf
111+
indent_size = unset
112+
indent_style = unset
113+
insert_final_newline = false
114+
tab_width = unset
115+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
1-
# Linux scripts
2-
*.sh text eol=lf
3-
*.py text diff=python eol=lf
1+
# Repo meta
2+
.gitattributes text eol=lf
3+
.gitignore text eol=lf
44

5-
# Linux configs
5+
# Configs
66
*.conf text eol=lf
77
*.yml text eol=lf
8+
*.yaml text eol=lf
9+
.editorconfig text eol=lf
10+
.globalconfig text eol=lf
811

9-
# Windows scripts
10-
*.ps1 text eol=crlf
12+
# Scripts
13+
*.sh text eol=lf
14+
*.py text diff=python eol=lf
15+
*.ps1 text eol=lf
1116
*.cmd text eol=crlf
1217
*.bat text eol=crlf
1318

1419
# Source code files
15-
*.cs text diff=csharp
16-
*.cshtml text
17-
*.json text
18-
*.xml text
19-
*.html text diff=html
20-
*.css text diff=css
21-
*.scss text diff=css
22-
*.js text
23-
*.csproj text
24-
*.targets text ident
25-
*.sln text
20+
*.cs text diff=csharp eol=lf
21+
*.cshtml text eol=lf
22+
*.json text eol=lf
23+
*.xml text eol=lf
24+
*.html text diff=html eol=lf
25+
*.css text diff=css eol=lf
26+
*.scss text diff=css eol=lf
27+
*.js text eol=lf
28+
*.csproj text eol=lf
29+
*.targets text eol=lf
30+
*.props text eol=lf
31+
*.sln text eol=lf
2632

27-
# Images
28-
*.svg text
33+
# Images (text)
34+
*.svg text eol=lf
2935

3036
# Text files
31-
*.txt text
32-
*.md text
33-
*.markdowm text
37+
*.txt text eol=lf
38+
*.md text eol=lf
39+
*.markdown text eol=lf
3440

3541
###############################
3642
# Git Large File System (LFS) #
@@ -43,10 +49,10 @@
4349
*.gz filter=lfs diff=lfs merge=lfs -text
4450
*.tar filter=lfs diff=lfs merge=lfs -text
4551
*.zip filter=lfs diff=lfs merge=lfs -text
52+
*.zst filter=lfs diff=lfs merge=lfs -text
4653

4754
# Documents
4855
*.pdf filter=lfs diff=lfs merge=lfs -text
49-
*.doc filter=lfs diff=lfs merge=lfs -text
5056
*.docx filter=lfs diff=lfs merge=lfs -text
5157

5258
# Images
@@ -61,8 +67,21 @@
6167
# Fonts
6268
*.woff2 filter=lfs diff=lfs merge=lfs -text
6369

64-
# Other
70+
# Executables
6571
*.exe filter=lfs diff=lfs merge=lfs -text
72+
*.dll filter=lfs diff=lfs merge=lfs -text
73+
74+
# Keyfiles
75+
*.pfx binary
76+
*.p12 binary
77+
*.snk binary
78+
*.cer binary
79+
80+
# Others
81+
*.dat binary
6682

6783
# Verify
68-
*.verified.txt text eol=lf working-tree-encoding=UTF-8
84+
*.verified.txt text eol=lf working-tree-encoding=UTF-8
85+
*.verified.xml text eol=lf working-tree-encoding=UTF-8
86+
*.verified.json text eol=lf working-tree-encoding=UTF-8
87+
*.verified.bin binary

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
# Benchmark.Net artifact folder
2727
*BenchmarkDotNet.Artifacts/
2828

29-
# FodyWeavers used for IL injection
30-
*FodyWeavers.*
31-
32-
# Others
33-
Publish/
29+
# Verify
3430
*.received.*
3531
*.received/

.globalconfig

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ is_global = true
1212
# ERPXXX ErrorProne https://github.com/SergeyTeplyakov/ErrorProne.NET
1313
# ERPXXX VS threading https://github.com/microsoft/vs-threading/tree/main
1414
# AsyncFixerXX AsyncFixer https://github.com/semihokur/AsyncFixer
15-
# HLQXXX Hyperlinq https://github.com/NetFabric/NetFabric.Hyperlinq
15+
# RSXXXX BannedAPI https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/Microsoft.CodeAnalysis.BannedApiAnalyzers/Microsoft.CodeAnalysis.BannedApiAnalyzers.md
1616

1717
# Documented duplicates according to https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/comparison-with-other-analyzers.md
1818
dotnet_diagnostic.MA0010.severity = none # Duplicate of CA1018
@@ -136,9 +136,6 @@ dotnet_diagnostic.RCS1063.severity = none # ([deprecated] Use RCS1252 instead) U
136136

137137
# Broken analyzer rules
138138
dotnet_diagnostic.GU0071.severity = none # Implicit casting done by the foreach
139-
dotnet_diagnostic.HLQ013.severity = none # Consider using 'foreach' loop instead of 'for' loop for iterating over System.ReadOnlySpan<ushort>
140-
dotnet_diagnostic.HLQ004.severity = none # The enumerator returns a reference to the item. Add 'ref readonly' to the item type
141-
dotnet_diagnostic.HLQ005.severity = none # Avoid the use of 'Single'. Use 'First' instead.
142139
dotnet_diagnostic.REFL040.severity = none # Prefer targetPropType. IsAssignableFrom. IsInstanceOfType(value)
143140

144141
# Other disabled rules
@@ -180,7 +177,6 @@ dotnet_diagnostic.SS003.severity = none # DivideIntegerByInteger
180177
dotnet_diagnostic.CA1024.severity = none # Use properties where appropriate
181178
dotnet_diagnostic.MA0006.severity = none # Use String.Equals instead of equality operator
182179
dotnet_diagnostic.S1104.severity = none # Make this field 'private' and encapsulate it in a 'public' property
183-
dotnet_diagnostic.HLQ012.severity = none # Consider using CollectionsMarshal. AsSpan() instead of foreach with List<System. Action<Chronos. SDK. Web. Datatables. AjaxDatatables. DatatablesPartialRenderingService>>
184180
dotnet_diagnostic.S3011.severity = none # Make sure that this accessibility bypass is safe here
185181
dotnet_diagnostic.S3459.severity = none # Remove unassigned auto-property 'NullString', or set its value.
186182
dotnet_diagnostic.SS023.severity = none # An exception is thrown from the getter of property Length
@@ -197,7 +193,6 @@ dotnet_diagnostic.S1199.severity = none # Nested code blocks should not be used
197193
dotnet_diagnostic.GU0060.severity = none # Enum member value conflict
198194
dotnet_diagnostic.MA0016.severity = none # Prefer using collection abstraction instead of implementation
199195
dotnet_diagnostic.CA1040.severity = none # Avoid empty interfaces
200-
dotnet_diagnostic.HLQ003.severity = none # Consider returning 'IReadOnlyList`1' instead
201196
dotnet_diagnostic.CA5394.severity = none # Random is an insecure random number generator. Use cryptographically secure random number generators when randomness is required for security.
202197
dotnet_diagnostic.CA5351.severity = none # HashingStream uses a broken cryptographic algorithm MD5
203198
dotnet_diagnostic.S1066.severity = none # Merge this if statement with the enclosing one
@@ -225,6 +220,8 @@ dotnet_diagnostic.CA2234.severity = none # Modify 'ContentHelper. GetContentAsyn
225220
dotnet_diagnostic.MA0075.severity = none # Do not use implicit culture-sensitive ToString
226221

227222
# Enforced rules
223+
dotnet_diagnostic.RS0030.severity = error # Do not use banned APIs
224+
dotnet_diagnostic.RS0031.severity = error # The list of banned symbols contains a duplicate
228225
dotnet_diagnostic.MA0103.severity = error # Use SequenceEqual instead of equality operator
229226
#dotnet_diagnostic.CA1032.severity = error # Implement standard exception constructors
230227
#dotnet_diagnostic.CA1810.severity = error # Initialize reference type static fields inline
@@ -319,7 +316,6 @@ dotnet_diagnostic.S2971.severity = error # Drop this useless call to 'ToList' or
319316
dotnet_diagnostic.S6608.severity = error # Indexing at 0 should be used instead of the "Enumerable" extension method "First"
320317
dotnet_diagnostic.S4487.severity = error # Remove this unread private field '_config' or refactor the code to use its value.
321318
dotnet_diagnostic.S1694.severity = error # Convert this 'abstract' class to an interface
322-
#dotnet_diagnostic.HLQ001.severity = error # 'Dictionary' has a value type enumerator. Assigning it to 'IDictionary' causes boxing of the enumerator.
323319
dotnet_diagnostic.S3218.severity = error # Rename this method to not shadow the outer class' member with the same name.
324320
dotnet_diagnostic.CA1033.severity = error # Make 'DatatablesResponse' sealed (a breaking change if this class has previously shipped), implement the method non-explicitly, or implement a new method that exposes the functionality of 'Chronos. SDK. Web. Datatables. AjaxDatatables. Model. IDatatablesResponse. GetDataObjects' and is visible to derived classes
325321
dotnet_diagnostic.SS038.severity = error # HttpContext was stored in a field. Use IHttpContextAccessor instead
@@ -379,26 +375,8 @@ dotnet_diagnostic.CS1581.severity = error # Invalid return type in XML comment c
379375
dotnet_diagnostic.CS1580.severity = error # Invalid type for parameter 'parameter number' in XML comment cref attribute
380376
dotnet_diagnostic.CS8762.severity = error # Parameter must have a non-null value when exiting in some condition.
381377

382-
# Temp Maybe
383-
# CA1508: Avoid dead conditional code
384-
385-
# Temp enabled
386-
387-
# Temp disable
388-
389-
# Temp duplicate
390-
391-
# Temp dont want
392-
393-
# temp deprecated
394-
395378
# temp broken
396379
dotnet_diagnostic.SS039.severity = none # EnumWithoutDefaultValue
397380
dotnet_diagnostic.GU0017.severity = none # Don't use discarded
398-
dotnet_diagnostic.xUnit1007.severity = none # Reports wrong when using TheoryData
399-
400-
# temp review
401381

402-
# temp suggestion
403-
dotnet_diagnostic.RS0016.severity = error # Public API analyzer should error on missing public types
404382

Imports/BannedSymbols.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
P:System.DateTime.Now;Use System.DateTime.UtcNow instead
2+
P:System.DateTimeOffset.Now;Use System.DateTimeOffset.UtcNow instead
3+
4+
P:System.IO.FileSystemInfo.CreationTime;Use CreationTimeUtc instead
5+
P:System.IO.FileSystemInfo.LastAccessTime;Use LastAccessTimeUtc instead
6+
P:System.IO.FileSystemInfo.LastWriteTime;Use LastWriteTimeUtc instead
7+
8+
M:System.IO.File.GetCreationTime(System.String);Use GetCreationTimeUtc instead
9+
M:System.IO.File.GetCreationTime(Microsoft.Win32.SafeHandles.SafeFileHandle);Use GetCreationTimeUtc instead
10+
M:System.IO.File.GetLastAccessTime(System.String);Use GetLastAccessTimeUtc instead
11+
M:System.IO.File.GetLastAccessTime(Microsoft.Win32.SafeHandles.SafeFileHandle);Use GetLastAccessTimeUtc instead
12+
M:System.IO.File.GetLastWriteTime(System.String);Use GetLastWriteTimeUtc instead
13+
M:System.IO.File.GetLastWriteTime(Microsoft.Win32.SafeHandles.SafeFileHandle);Use GetLastWriteTimeUtc instead
14+
M:System.IO.File.SetCreationTime(System.String,System.DateTime);Use SetCreationTimeUtc instead
15+
M:System.IO.File.SetCreationTime(Microsoft.Win32.SafeHandles.SafeFileHandle,System.DateTime);Use SetCreationTimeUtc instead
16+
M:System.IO.File.SetLastAccessTime(System.String,System.DateTime);Use SetLastAccessTimeUtc instead
17+
M:System.IO.File.SetLastAccessTime(Microsoft.Win32.SafeHandles.SafeFileHandle,System.DateTime);Use SetLastAccessTimeUtc instead
18+
M:System.IO.File.SetLastWriteTime(System.String,System.DateTime);Use SetLastWriteTimeUtc instead
19+
M:System.IO.File.SetLastWriteTime(Microsoft.Win32.SafeHandles.SafeFileHandle,System.DateTime);Use SetLastWriteTimeUtc instead
20+
21+
M:System.IO.Directory.GetCreationTime(System.String);Use GetCreationTimeUtc instead
22+
M:System.IO.Directory.GetLastWriteTime(System.String);Use GetLastWriteTimeUtc instead
23+
M:System.IO.Directory.GetLastAccessTime(System.String);Use GetLastAccessTimeUtc instead
24+
M:System.IO.Directory.SetCreationTime(System.String,System.DateTime);Use SetCreationTimeUtc instead
25+
M:System.IO.Directory.SetLastAccessTime(System.String,System.DateTime);Use SetLastAccessTimeUtc instead
26+
M:System.IO.Directory.SetLastWriteTime(System.String,System.DateTime);Use SetLastWriteTimeUtc instead
27+
28+
F:System.StringComparison.InvariantCulture;Do you mean Ordinal?
29+
F:System.StringComparison.InvariantCultureIgnoreCase;Do you mean OrdinalIgnoreCase?
30+
P:System.StringComparer.InvariantCulture;Do you mean Ordinal?
31+
P:System.StringComparer.InvariantCultureIgnoreCase;Do you mean OrdinalIgnoreCase?
32+
33+
M:System.Enum.TryParse(System.Type,System.String,System.Object);Use an overload with a ignoreCase argument
34+
M:System.Enum.TryParse(System.Type,System.ReadOnlySpan{System.Char},System.Object);Use an overload with a ignoreCase argument
35+
M:System.Enum.TryParse``1(System.String,``0@);Use an overload with a ignoreCase argument
36+
M:System.Enum.TryParse``1(System.ReadOnlySpan{System.Char},``0@);Use an overload with a ignoreCase argument
37+
38+
M:System.Math.Round(System.Decimal);Use an overload with a MidpointRounding argument
39+
M:System.Math.Round(System.Decimal,System.Int32);Use an overload with a MidpointRounding argument
40+
M:System.Math.Round(System.Double);Use an overload with a MidpointRounding argument
41+
M:System.Math.Round(System.Double,System.Int32);Use an overload with a MidpointRounding argument
42+
M:System.MathF.Round(System.Single);Use an overload with a MidpointRounding argument
43+
M:System.MathF.Round(System.Single,System.Int32);Use an overload with a MidpointRounding argument
44+
45+
M:System.Globalization.CultureInfo.#ctor(System.String);Use CultureInfo.GetCultureInfo
46+
47+
T:System.Tuple`1;Use System.ValueTuple`1
48+
T:System.Tuple`2;Use System.ValueTuple`2
49+
T:System.Tuple`3;Use System.ValueTuple`3
50+
T:System.Tuple`4;Use System.ValueTuple`4
51+
T:System.Tuple`5;Use System.ValueTuple`5
52+
T:System.Tuple`6;Use System.ValueTuple`6
53+
T:System.Tuple`7;Use System.ValueTuple`7
54+
T:System.Tuple`8;Use System.ValueTuple`8

Imports/Library.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</ItemGroup>
2121

2222
<ItemGroup Condition="'$(IncludeAnalyzers)' == 'True'">
23+
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" PrivateAssets="all" />
2324
<PackageReference Include="ConfigureAwaitChecker.Analyzer" PrivateAssets="all" />
2425
<PackageReference Include="IDisposableAnalyzers" PrivateAssets="all" />
2526
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all" />
@@ -31,7 +32,6 @@
3132
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="all" />
3233
<PackageReference Include="SharpSource" PrivateAssets="all" />
3334
<PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" />
34-
<PackageReference Include="NetFabric.Hyperlinq.Analyzer" PrivateAssets="all" />
3535
<PackageReference Include="SonarAnalyzer.CSharp" PrivateAssets="all" />
3636
</ItemGroup>
3737

Imports/Tests.props

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<PropertyGroup>
4-
<OutputType>Library</OutputType>
4+
<OutputType>Exe</OutputType>
55
<IsPackable>false</IsPackable>
6+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
7+
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
68
</PropertyGroup>
79

810
<ItemGroup>
911
<Using Include="Xunit" />
10-
<Using Include="Xunit.Abstractions" />
1112
<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" />
1213
</ItemGroup>
1314

@@ -17,11 +18,7 @@
1718

1819
<ItemGroup>
1920
<PackageReference Include="Microsoft.NET.Test.Sdk" PrivateAssets="all" />
20-
<PackageReference Include="xunit" PrivateAssets="all" />
21-
</ItemGroup>
22-
23-
<ItemGroup Condition="'$(IncludeAnalyzers)' == 'True'">
24-
<PackageReference Include="xunit.analyzers" PrivateAssets="all" />
21+
<PackageReference Include="xunit.v3.mtp-v2" PrivateAssets="all" />
2522
</ItemGroup>
2623

2724
<Import Project="../Locals/Tests.props" Condition="Exists('../Locals/Tests.props')" />

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Ian Qvist
3+
Copyright (c) 2025 Ian Qvist
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Locals/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
1313
<PackageVersion Include="System.Linq.Async" Version="6.0.3" />
1414
<PackageVersion Include="Verify.DiffPlex" Version="3.1.2" />
15-
<PackageVersion Include="Verify.Xunit" Version="30.4.0" />
16-
<PackageVersion Include="xunit.extensibility.core" Version="2.9.3" />
15+
<PackageVersion Include="Verify.XunitV3" Version="31.9.0" />
1716
<PackageVersion Include="AgileObjects.ReadableExpressions" Version="4.1.3" />
1817
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.6" />
1918
<PackageVersion Include="Serilog.Expressions" Version="5.0.0" />
@@ -22,5 +21,6 @@
2221
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
2322
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="4.14.0" />
2423
<PackageVersion Include="Genbox.FastData.SourceGenerator" Version="0.2.0" />
24+
<PackageVersion Include="xunit.v3.extensibility.core" Version="3.2.1" />
2525
</ItemGroup>
2626
</Project>

Locals/Tests.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
<ItemGroup>
44
<PackageReference Include="Verify.DiffPlex" PrivateAssets="All" />
5-
<PackageReference Include="Verify.Xunit" PrivateAssets="All" />
6-
<PackageReference Include="xunit.extensibility.core" PrivateAssets="All" />
5+
<PackageReference Include="Verify.XunitV3" PrivateAssets="All" />
76
</ItemGroup>
87

98
</Project>

0 commit comments

Comments
 (0)