Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
end_of_line = crlf
# LF on every platform, matching the `* text=auto eol=lf` default in .gitattributes.
# Overrides below must stay in step with the eol pins in that file.
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# .NET code files
[*.{cs,csx,cake,fs,fsx,vb,vbx}]
indent_style = tab

file_header_template = Copyright (c) ktsu.dev\nAll rights reserved.\nLicensed under the MIT license.
file_header_template = Copyright (c) 2023-2026 ktsu-dev contributors

# Default severity for all .NET Code Style rules
dotnet_analyzer_diagnostic.severity = error
Expand Down Expand Up @@ -503,4 +505,9 @@ indent_style = tab
# Shell scripts
[*.sh]
end_of_line = lf
indent_size = 2
indent_size = 2

# Windows batch scripts and Visual Studio solution files keep CRLF on every platform.
# These match the eol=crlf pins in .gitattributes.
[*.{cmd,bat,sln}]
end_of_line = crlf
23 changes: 14 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,25 @@
# Git Line Endings #
###############################

# Set default behaviour to automatically normalize line endings.
* text=auto
# Normalize all text files to LF in the repository, and check them out as LF on every
# platform. The explicit eol overrides each machine's core.autocrlf, so the working tree
# is byte-identical on Windows, Linux and macOS. This must stay in step with the
# end_of_line settings in .editorconfig.
* text=auto eol=lf

# csharp files to match .editorconfig
*.cs text eol=crlf
# Force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work. Redundant with the
# default above, kept explicit because these files break outright with CRLF.
*.sh text eol=lf

# Force batch scripts to always use CRLF line endings so that if a repo is accessed
# in Windows via a file share from Linux, the scripts will work.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.cmd text eol=crlf
*.bat text eol=crlf

# Force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf
# Visual Studio rewrites solution files with CRLF regardless of the checkout, so pin
# them to avoid a spurious whole-file diff every time the solution is opened.
*.sln text eol=crlf

###############################
# Git Large File System (LFS) #
Expand Down
21 changes: 1 addition & 20 deletions .runsettings
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Specify a deterministic output directory -->
<RunConfiguration>
<ResultsDirectory>.\coverage</ResultsDirectory>
<ResultsDirectory>TestResults</ResultsDirectory>
</RunConfiguration>
<!-- Specify a deterministic output directory -->
<RunConfiguration>
<ResultsDirectory>.\coverage</ResultsDirectory>
</RunConfiguration>

<!-- Configuration for coverlet data collector -->
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="coverlet.collector.DataCollectors.CoverletInProcDataCollector, coverlet.collector, Version=6.0.4.0, Culture=neutral, PublicKeyToken=null">
<Configuration>
<Format>opencover</Format>
<OutputPath>coverage.opencover.xml</OutputPath>
<Exclude>[*Test*]*,[*Tests*]*</Exclude>
<ExcludeByFile>**/obj/**/*</ExcludeByFile>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
4 changes: 1 addition & 3 deletions AppDataStorage.Test/AppDataTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) ktsu.dev
// All rights reserved.
// Licensed under the MIT license.
// Copyright (c) 2023-2026 ktsu-dev contributors

[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]

Expand Down Expand Up @@ -964,8 +962,8 @@
Assert.AreEqual(appData.DoubleData, loaded.DoubleData, "Double data should match");
Assert.AreEqual(appData.BoolData, loaded.BoolData, "Bool data should match");
Assert.AreEqual(appData.DateTimeData, loaded.DateTimeData, "DateTime data should match");
CollectionAssert.AreEqual(appData.ListData, loaded.ListData, "List data should match");

Check warning on line 965 in AppDataStorage.Test/AppDataTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use 'Assert.AreSequenceEqual' instead of 'CollectionAssert.AreEqual'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_AppDataStorage&issues=AZ_wAPysqr1UlcMjLN6Z&open=AZ_wAPysqr1UlcMjLN6Z&pullRequest=266
CollectionAssert.AreEqual(appData.DictData, loaded.DictData, "Dictionary data should match");

Check warning on line 966 in AppDataStorage.Test/AppDataTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use 'Assert.AreSequenceEqual' instead of 'CollectionAssert.AreEqual'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_AppDataStorage&issues=AZ_wAPysqr1UlcMjLN6a&open=AZ_wAPysqr1UlcMjLN6a&pullRequest=266
Assert.AreEqual(appData.EnumData, loaded.EnumData, "Enum data should match");
}

Expand Down
4 changes: 1 addition & 3 deletions AppDataStorage/AppData.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) ktsu.dev
// All rights reserved.
// Licensed under the MIT license.
// Copyright (c) 2023-2026 ktsu-dev contributors

namespace ktsu.AppDataStorage;

Expand Down Expand Up @@ -410,10 +408,10 @@
/// </summary>
#if NET9_0_OR_GREATER
[JsonIgnore]
public static Lock Lock { get; } = new();

Check warning on line 411 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 411 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 411 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 411 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.
#else
[JsonIgnore]
public static object Lock { get; } = new();

Check warning on line 414 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 414 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 414 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 414 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 414 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.

Check warning on line 414 in AppDataStorage/AppData.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

A static field in a generic type is not shared among instances of different close constructed types.
#endif

internal bool IsSaveQueued()
Expand Down
4 changes: 1 addition & 3 deletions AppDataStorage/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Copyright (c) ktsu.dev
// All rights reserved.
// Licensed under the MIT license.
// Copyright (c) 2023-2026 ktsu-dev contributors

using System.Runtime.CompilerServices;

Expand Down
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<PackageVersion Include="ktsu.Semantics.Paths" Version="2.9.3" />
<PackageVersion Include="ktsu.RoundTripStringJsonConverter" Version="1.0.38" />
<PackageVersion Include="ktsu.CaseConverter" Version="1.3.26" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.3.2" />
<PackageVersion Include="Polyfill" Version="11.0.2" />
<PackageVersion Include="TestableIO.System.IO.Abstractions" Version="22.2.0" />
<PackageVersion Include="TestableIO.System.IO.Abstractions.TestingHelpers" Version="22.2.0" />
Expand Down
18 changes: 9 additions & 9 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
},
"msbuild-sdks": {
"MSTest.Sdk": "4.3.3",
"ktsu.Sdk": "2.18.0",
"ktsu.Sdk.ConsoleApp": "2.18.0",
"ktsu.Sdk.Tool": "2.18.0",
"ktsu.Sdk.App": "2.18.0",
"ktsu.Sdk.Windows": "2.18.0",
"ktsu.Sdk.Linux": "2.18.0",
"ktsu.Sdk.macOS": "2.18.0",
"ktsu.Sdk.iOS": "2.18.0",
"ktsu.Sdk.Android": "2.18.0"
"ktsu.Sdk": "2.21.1",
"ktsu.Sdk.ConsoleApp": "2.21.1",
"ktsu.Sdk.Tool": "2.21.1",
"ktsu.Sdk.App": "2.21.1",
"ktsu.Sdk.Windows": "2.21.1",
"ktsu.Sdk.Linux": "2.21.1",
"ktsu.Sdk.macOS": "2.21.1",
"ktsu.Sdk.iOS": "2.21.1",
"ktsu.Sdk.Android": "2.21.1"
},
"test": {
"runner": "Microsoft.Testing.Platform"
Expand Down