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 CredentialCache.Test/CredentialCacheTests.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.CredentialCache.Test;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache.Test/NativeCredentialStoreTests.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.CredentialCache.Test;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Credential.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.CredentialCache;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/CredentialCache.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.CredentialCache;

Expand All @@ -11,7 +9,7 @@
/// <summary>
/// Represents a globally unique identifier for a persona.
/// </summary>
public sealed record class PersonaGUID : SemanticString<PersonaGUID> { }

Check warning on line 12 in CredentialCache/CredentialCache.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Rename record 'PersonaGUID' to match pascal case naming rules, consider using 'PersonaGuid'.

Check warning on line 12 in CredentialCache/CredentialCache.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Rename record 'PersonaGUID' to match pascal case naming rules, consider using 'PersonaGuid'.

/// <summary>
/// Caches <see cref="Credential"/> instances in memory and persists each one through
Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/CredentialWithNothing.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.CredentialCache;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/CredentialWithToken.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.CredentialCache;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/CredentialWithUsernamePassword.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.CredentialCache;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/ICredentialFactory.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.CredentialCache;

Expand All @@ -14,7 +12,7 @@
/// Represents a factory for creating credentials of a specific type.
/// </summary>
/// <typeparam name="T">The type of credential to create.</typeparam>
public interface ICredentialFactory<T> : ICredentialFactory where T : Credential

Check warning on line 15 in CredentialCache/ICredentialFactory.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Add the 'out' keyword to parameter 'T' to make it 'covariant'.

Check warning on line 15 in CredentialCache/ICredentialFactory.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Add the 'out' keyword to parameter 'T' to make it 'covariant'.
{
/// <summary>
/// Creates a new instance of the credential.
Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/CredentialSerialization.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.CredentialCache.Storage;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/CredentialStoreException.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.CredentialCache.Storage;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/CredentialStoreFactory.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.CredentialCache.Storage;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/ICredentialStore.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.CredentialCache.Storage;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/ISearchableCredentialStore.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.CredentialCache.Storage;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/InMemoryCredentialStore.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.CredentialCache.Storage;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/LinuxSecretServiceCredentialStore.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.CredentialCache.Storage;

Expand Down Expand Up @@ -46,8 +44,8 @@
Schema.Handle,
IntPtr.Zero,
ref error,
"service", _serviceName,

Check warning on line 47 in CredentialCache/Storage/LinuxSecretServiceCredentialStore.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Define a constant instead of using this literal 'service' 4 times.

Check warning on line 47 in CredentialCache/Storage/LinuxSecretServiceCredentialStore.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Define a constant instead of using this literal 'service' 4 times.
"account", persona.ToString(),

Check warning on line 48 in CredentialCache/Storage/LinuxSecretServiceCredentialStore.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Define a constant instead of using this literal 'account' 4 times.

Check warning on line 48 in CredentialCache/Storage/LinuxSecretServiceCredentialStore.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Define a constant instead of using this literal 'account' 4 times.
IntPtr.Zero);

ThrowIfError(error, "secret_password_lookup_sync");
Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/MacOsCredentialStore.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.CredentialCache.Storage;

Expand Down
4 changes: 1 addition & 3 deletions CredentialCache/Storage/WindowsCredentialStore.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.CredentialCache.Storage;

Expand Down Expand Up @@ -174,7 +172,7 @@
internal const int CRED_MAX_CREDENTIAL_BLOB_SIZE = 5 * 512;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct CREDENTIAL

Check warning on line 175 in CredentialCache/Storage/WindowsCredentialStore.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Rename struct 'CREDENTIAL' to match pascal case naming rules, consider using 'Credential'.

Check warning on line 175 in CredentialCache/Storage/WindowsCredentialStore.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

Rename struct 'CREDENTIAL' to match pascal case naming rules, consider using 'Credential'.
{
public int Flags;
public int Type;
Expand Down
34 changes: 16 additions & 18 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="ktsu.RoundTripStringJsonConverter" Version="1.0.38" />
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.14.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="1.7.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.Fakes" Version="17.14.1" />
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="1.7.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.HotReload" Version="1.7.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.Retry" Version="1.7.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="1.7.2" />
<PackageVersion Include="Polyfill" Version="11.0.2" />
<PackageVersion Include="ktsu.Semantics.Strings" Version="2.9.3" />
<PackageVersion Include="System.Text.Json" Version="10.0.10" />
</ItemGroup>
</Project>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="ktsu.RoundTripStringJsonConverter" Version="1.0.38" />
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="1.7.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.Fakes" Version="17.14.1" />
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="1.7.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.HotReload" Version="1.7.2" />
<PackageVersion Include="Microsoft.Testing.Extensions.Retry" Version="1.7.2" />
<PackageVersion Include="Polyfill" Version="11.0.2" />
<PackageVersion Include="ktsu.Semantics.Strings" Version="2.9.3" />
<PackageVersion Include="System.Text.Json" Version="10.0.10" />
</ItemGroup>
</Project>
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
Loading