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 Containers.Benchmarks/ContiguousCollectionBenchmarks.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.Containers.Benchmarks;

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

Expand Down Expand Up @@ -107,7 +105,7 @@
}

int found = 0;
foreach (int key in searchKeys)

Check warning on line 108 in Containers.Benchmarks/ContiguousMapBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmKR_hwkmKdaWrEv&open=AZ_wAmKR_hwkmKdaWrEv&pullRequest=35
{
if (map.ContainsKey(key))
{
Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/ContiguousSetBenchmarks.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.Containers.Benchmarks;

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

Expand Down Expand Up @@ -105,7 +103,7 @@
{
OrderedCollection<int> collection = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 106 in Containers.Benchmarks/CrossCollectionComparisonBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJz_hwkmKdaWrEm&open=AZ_wAmJz_hwkmKdaWrEm&pullRequest=35
{
if (collection.Contains(item))
{
Expand All @@ -124,7 +122,7 @@
List<int> list = [.. testData];
list.Sort();
int found = 0;
foreach (int item in searchData)

Check warning on line 125 in Containers.Benchmarks/CrossCollectionComparisonBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJz_hwkmKdaWrEn&open=AZ_wAmJz_hwkmKdaWrEn&pullRequest=35
{
if (list.BinarySearch(item) >= 0)
{
Expand Down Expand Up @@ -384,7 +382,7 @@

// Search operations
int found = 0;
foreach (int item in searchData.Take(10))

Check warning on line 385 in Containers.Benchmarks/CrossCollectionComparisonBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJz_hwkmKdaWrEo&open=AZ_wAmJz_hwkmKdaWrEo&pullRequest=35
{
if (collection.Contains(item))
{
Expand Down Expand Up @@ -461,10 +459,10 @@
cache.PushBack(item);

// Simulate occasional access to recent items
if (cache.Count > 10 && random.Next(5) == 0)

Check warning on line 462 in Containers.Benchmarks/CrossCollectionComparisonBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Change this condition so that it does not always evaluate to 'False'. Some code paths are unreachable.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJz_hwkmKdaWrEq&open=AZ_wAmJz_hwkmKdaWrEq&pullRequest=35
{
int index = random.Next(Math.Min(cache.Count, 10));
int value = cache[index]; // Access recent item

Check warning on line 465 in Containers.Benchmarks/CrossCollectionComparisonBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the unused local variable 'value'.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJz_hwkmKdaWrEr&open=AZ_wAmJz_hwkmKdaWrEr&pullRequest=35
}
}

Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/GlobalSuppressions.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.Diagnostics.CodeAnalysis;

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

Expand Down Expand Up @@ -85,7 +83,7 @@
{
InsertionOrderCollection<int> collection = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 86 in Containers.Benchmarks/InsertionOrderCollectionBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmLP_hwkmKdaWrE4&open=AZ_wAmLP_hwkmKdaWrE4&pullRequest=35
{
if (collection.Contains(item))
{
Expand All @@ -103,7 +101,7 @@
{
List<int> list = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 104 in Containers.Benchmarks/InsertionOrderCollectionBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmLP_hwkmKdaWrE5&open=AZ_wAmLP_hwkmKdaWrE5&pullRequest=35
{
if (list.Contains(item))
{
Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/InsertionOrderMapBenchmarks.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.Containers.Benchmarks;

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

Expand Down Expand Up @@ -131,7 +129,7 @@
{
SortedSet<int> set = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 132 in Containers.Benchmarks/InsertionOrderSetBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmHg_hwkmKdaWrEf&open=AZ_wAmHg_hwkmKdaWrEf&pullRequest=35
{
if (set.Contains(item))
{
Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/OrderedCollectionBenchmarks.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.Containers.Benchmarks;

Expand Down Expand Up @@ -115,7 +113,7 @@
List<int> list = [.. testData];
list.Sort();
int found = 0;
foreach (int item in searchData)

Check warning on line 116 in Containers.Benchmarks/OrderedCollectionBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmKf_hwkmKdaWrEz&open=AZ_wAmKf_hwkmKdaWrEz&pullRequest=35
{
if (list.BinarySearch(item) >= 0)
{
Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/OrderedMapBenchmarks.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.Containers.Benchmarks;

Expand All @@ -16,7 +14,7 @@
private readonly Random random = new(42);
private int[] keys = [];
private string[] values = [];
private KeyValuePair<int, string>[] keyValuePairs = [];

Check failure on line 17 in Containers.Benchmarks/OrderedMapBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unread private field 'keyValuePairs' or refactor the code to use its value.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmLB_hwkmKdaWrE3&open=AZ_wAmLB_hwkmKdaWrE3&pullRequest=35

/// <summary>
/// Gets or sets the number of elements to use in benchmarks.
Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/OrderedSetBenchmarks.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.Containers.Benchmarks;

Expand Down Expand Up @@ -123,7 +121,7 @@
{
HashSet<int> set = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 124 in Containers.Benchmarks/OrderedSetBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmLt_hwkmKdaWrE-&open=AZ_wAmLt_hwkmKdaWrE-&pullRequest=35
{
if (set.Contains(item))
{
Expand All @@ -141,7 +139,7 @@
{
SortedSet<int> set = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 142 in Containers.Benchmarks/OrderedSetBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmLt_hwkmKdaWrE_&open=AZ_wAmLt_hwkmKdaWrE_&pullRequest=35
{
if (set.Contains(item))
{
Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/PerformanceAnalysisBenchmarks.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.Containers.Benchmarks;

Expand Down Expand Up @@ -269,7 +267,7 @@
bool result = collection.Count == 0;
result &= set.Count == 0;
result &= buffer.Count == 0;
result &= !collection.Contains(42);

Check warning on line 270 in Containers.Benchmarks/PerformanceAnalysisBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this call, the collection is known to be empty here.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmLe_hwkmKdaWrE6&open=AZ_wAmLe_hwkmKdaWrE6&pullRequest=35
result &= !set.Contains(42);

return result;
Expand Down Expand Up @@ -339,7 +337,7 @@

// Calculate running average of window
double windowSum = 0;
foreach (double windowValue in window)

Check warning on line 340 in Containers.Benchmarks/PerformanceAnalysisBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this call, the collection is known to be empty here.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmLe_hwkmKdaWrE8&open=AZ_wAmLe_hwkmKdaWrE8&pullRequest=35
{
windowSum += windowValue;
}
Expand Down
4 changes: 1 addition & 3 deletions Containers.Benchmarks/Program.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.Containers.Benchmarks;

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

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

Expand Down Expand Up @@ -177,7 +175,7 @@
{
HashSet<int> set = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 178 in Containers.Benchmarks/StandardCollectionBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJg_hwkmKdaWrEh&open=AZ_wAmJg_hwkmKdaWrEh&pullRequest=35
{
if (set.Contains(item))
{
Expand Down Expand Up @@ -228,7 +226,7 @@
{
SortedSet<int> set = [.. testData];
int found = 0;
foreach (int item in searchData)

Check warning on line 229 in Containers.Benchmarks/StandardCollectionBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJg_hwkmKdaWrEi&open=AZ_wAmJg_hwkmKdaWrEi&pullRequest=35
{
if (set.Contains(item))
{
Expand Down Expand Up @@ -298,7 +296,7 @@
}

int found = 0;
foreach (int key in searchData)

Check warning on line 299 in Containers.Benchmarks/StandardCollectionBenchmarks.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Loops should be simplified using the "Where" LINQ method

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmJg_hwkmKdaWrEj&open=AZ_wAmJg_hwkmKdaWrEj&pullRequest=35
{
if (dict.ContainsKey(key))
{
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright (c) ktsu.dev
// All rights reserved.
// Licensed under the MIT license.
// Copyright (c) 2023-2026 ktsu-dev contributors

[assembly: Microsoft.VisualStudio.TestTools.UnitTesting.Parallelize(Scope = Microsoft.VisualStudio.TestTools.UnitTesting.ExecutionScope.MethodLevel)]
4 changes: 1 addition & 3 deletions Containers.Test/ContiguousCollectionTests.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.Containers.Tests;

Expand Down Expand Up @@ -353,7 +351,7 @@
}

// Assert
CollectionAssert.AreEqual(expected, enumerated);

Check warning on line 354 in Containers.Test/ContiguousCollectionTests.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_Containers&issues=AZ_wAmPF_hwkmKdaWrFF&open=AZ_wAmPF_hwkmKdaWrFF&pullRequest=35
}

[TestMethod]
Expand Down Expand Up @@ -383,7 +381,7 @@
ReadOnlySpan<int> span = collection.AsReadOnlySpan();

// Assert
Assert.AreEqual(4, span.Length);

Check warning on line 384 in Containers.Test/ContiguousCollectionTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use 'Assert.HasCount' instead of 'Assert.AreEqual'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmPF_hwkmKdaWrFH&open=AZ_wAmPF_hwkmKdaWrFH&pullRequest=35
Assert.AreEqual(3, span[0]);
Assert.AreEqual(1, span[1]);
Assert.AreEqual(4, span[2]);
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/ContiguousMapTests.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.Containers.Tests;

Expand Down Expand Up @@ -413,7 +411,7 @@
ReadOnlySpan<int> keysSpan = map.GetKeysSpan();

// Assert
Assert.AreEqual(4, keysSpan.Length);

Check warning on line 414 in Containers.Test/ContiguousMapTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use 'Assert.HasCount' instead of 'Assert.AreEqual'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmP1_hwkmKdaWrFr&open=AZ_wAmP1_hwkmKdaWrFr&pullRequest=35

// Verify all keys are in the span
HashSet<int> spanKeys = [];
Expand Down Expand Up @@ -480,7 +478,7 @@
// Test span access (only possible with contiguous memory)
ReadOnlySpan<int> keysSpan = map.GetKeysSpan();
ReadOnlySpan<string> valuesSpan = map.GetValuesSpan();
Assert.AreEqual(1000, keysSpan.Length);

Check warning on line 481 in Containers.Test/ContiguousMapTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use 'Assert.HasCount' instead of 'Assert.AreEqual'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmP1_hwkmKdaWrFs&open=AZ_wAmP1_hwkmKdaWrFs&pullRequest=35
Assert.AreEqual(1000, valuesSpan.Length);

// Verify all keys are in the span
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/ContiguousSetTests.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.Containers.Tests;

Expand Down Expand Up @@ -229,7 +227,7 @@
ReadOnlySpan<int> span = set.AsReadOnlySpan();

// Assert
Assert.AreEqual(4, span.Length);

Check warning on line 230 in Containers.Test/ContiguousSetTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use 'Assert.HasCount' instead of 'Assert.AreEqual'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmPb_hwkmKdaWrFV&open=AZ_wAmPb_hwkmKdaWrFV&pullRequest=35

// Verify all elements are in the span
HashSet<int> spanElements = [];
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/DelayLineTests.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.Containers.Tests;

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

Expand Down Expand Up @@ -344,7 +342,7 @@
}

// Assert
CollectionAssert.AreEqual(expected, enumerated);

Check warning on line 345 in Containers.Test/InsertionOrderCollectionTests.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_Containers&issues=AZ_wAmO1_hwkmKdaWrFD&open=AZ_wAmO1_hwkmKdaWrFD&pullRequest=35
}

[TestMethod]
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/InsertionOrderMapTests.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.Containers.Tests;

Expand Down Expand Up @@ -54,7 +52,7 @@

// Verify insertion order
int[] expectedOrder = [3, 1, 4, 2];
CollectionAssert.AreEqual(expectedOrder, map.Keys.ToArray());

Check warning on line 55 in Containers.Test/InsertionOrderMapTests.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_Containers&issues=AZ_wAmPj_hwkmKdaWrFX&open=AZ_wAmPj_hwkmKdaWrFX&pullRequest=35
}

[TestMethod]
Expand Down Expand Up @@ -244,7 +242,7 @@

// Verify order maintained
int[] expectedOrder = [1, 3];
CollectionAssert.AreEqual(expectedOrder, map.Keys.ToArray());

Check warning on line 245 in Containers.Test/InsertionOrderMapTests.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_Containers&issues=AZ_wAmPj_hwkmKdaWrFY&open=AZ_wAmPj_hwkmKdaWrFY&pullRequest=35
}

[TestMethod]
Expand Down Expand Up @@ -296,7 +294,7 @@

// Assert
int[] expectedOrder = [3, 1, 4, 2];
CollectionAssert.AreEqual(expectedOrder, keys);

Check warning on line 297 in Containers.Test/InsertionOrderMapTests.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_Containers&issues=AZ_wAmPj_hwkmKdaWrFZ&open=AZ_wAmPj_hwkmKdaWrFZ&pullRequest=35
}

[TestMethod]
Expand Down Expand Up @@ -408,7 +406,7 @@

// Assert
int[] expectedOrder = [5, 2, 4]; // Insertion order minus removed items
CollectionAssert.AreEqual(expectedOrder, map.Keys.ToArray());

Check warning on line 409 in Containers.Test/InsertionOrderMapTests.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_Containers&issues=AZ_wAmPj_hwkmKdaWrFb&open=AZ_wAmPj_hwkmKdaWrFb&pullRequest=35
}

[TestMethod]
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/InsertionOrderSetTests.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.Containers.Tests;

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

Expand Down Expand Up @@ -431,7 +429,7 @@
List<int> actual = [.. collection];

// Assert
CollectionAssert.AreEqual(expected, actual);

Check warning on line 432 in Containers.Test/OrderedCollectionTests.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_Containers&issues=AZ_wAmO9_hwkmKdaWrFE&open=AZ_wAmO9_hwkmKdaWrFE&pullRequest=35
}

[TestMethod]
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/OrderedMapTests.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.Containers.Test;

Expand Down Expand Up @@ -71,7 +69,7 @@
int[] expectedKeys = [1, 2, 3];
string[] expectedValues = ["one", "two", "three"];
CollectionAssert.AreEqual(expectedKeys, map.Keys.ToArray());
CollectionAssert.AreEqual(expectedValues, map.Values.ToArray());

Check warning on line 72 in Containers.Test/OrderedMapTests.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_Containers&issues=AZ_wAmPN_hwkmKdaWrFL&open=AZ_wAmPN_hwkmKdaWrFL&pullRequest=35
}

/// <summary>
Expand All @@ -89,7 +87,7 @@

int[] expectedKeys = [1, 2, 3];
string[] expectedValues = ["one", "two", "three"];
CollectionAssert.AreEqual(expectedKeys, map.Keys.ToArray());

Check warning on line 90 in Containers.Test/OrderedMapTests.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_Containers&issues=AZ_wAmPN_hwkmKdaWrFM&open=AZ_wAmPN_hwkmKdaWrFM&pullRequest=35
CollectionAssert.AreEqual(expectedValues, map.Values.ToArray());
}

Expand Down Expand Up @@ -167,7 +165,7 @@

Assert.AreEqual(3, map.Count);
int[] expectedKeys = [1, 2, 3];
CollectionAssert.AreEqual(expectedKeys, map.Keys.ToArray());

Check warning on line 168 in Containers.Test/OrderedMapTests.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_Containers&issues=AZ_wAmPN_hwkmKdaWrFO&open=AZ_wAmPN_hwkmKdaWrFO&pullRequest=35
}

/// <summary>
Expand Down Expand Up @@ -239,7 +237,7 @@
Assert.AreEqual(2, map.Count);
Assert.IsFalse(map.ContainsKey(2), "Removed key should no longer exist");
int[] expectedKeys = [1, 3];
CollectionAssert.AreEqual(expectedKeys, map.Keys.ToArray());

Check warning on line 240 in Containers.Test/OrderedMapTests.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_Containers&issues=AZ_wAmPN_hwkmKdaWrFP&open=AZ_wAmPN_hwkmKdaWrFP&pullRequest=35
}

/// <summary>
Expand Down Expand Up @@ -306,7 +304,7 @@
};

int[] expectedKeys = [1, 2, 3];
CollectionAssert.AreEqual(expectedKeys, map.Keys.ToArray());

Check warning on line 307 in Containers.Test/OrderedMapTests.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_Containers&issues=AZ_wAmPN_hwkmKdaWrFQ&open=AZ_wAmPN_hwkmKdaWrFQ&pullRequest=35
}

/// <summary>
Expand Down Expand Up @@ -383,8 +381,8 @@
OrderedMap<int, string> clone = map.Clone();

Assert.AreEqual(map.Count, clone.Count);
CollectionAssert.AreEqual(map.Keys.ToArray(), clone.Keys.ToArray());

Check warning on line 384 in Containers.Test/OrderedMapTests.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_Containers&issues=AZ_wAmPN_hwkmKdaWrFS&open=AZ_wAmPN_hwkmKdaWrFS&pullRequest=35
CollectionAssert.AreEqual(map.Values.ToArray(), clone.Values.ToArray());

Check warning on line 385 in Containers.Test/OrderedMapTests.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_Containers&issues=AZ_wAmPN_hwkmKdaWrFT&open=AZ_wAmPN_hwkmKdaWrFT&pullRequest=35

// Verify they are independent
clone.Add(3, "three");
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/OrderedSetTests.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.Containers.Test;

Expand Down Expand Up @@ -279,7 +277,7 @@
}

int[] expected = [1, 2, 5, 8, 9];
CollectionAssert.AreEqual(expected, result);

Check warning on line 280 in Containers.Test/OrderedSetTests.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_Containers&issues=AZ_wAmPs_hwkmKdaWrFi&open=AZ_wAmPs_hwkmKdaWrFi&pullRequest=35
}

[TestMethod]
Expand All @@ -295,7 +293,7 @@
}

object[] expected = [1, 2, 5, 8, 9];
CollectionAssert.AreEqual(expected, result);

Check warning on line 296 in Containers.Test/OrderedSetTests.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_Containers&issues=AZ_wAmPs_hwkmKdaWrFj&open=AZ_wAmPs_hwkmKdaWrFj&pullRequest=35
}

[TestMethod]
Expand All @@ -308,7 +306,7 @@

Assert.AreEqual(6, set1.Count);
int[] expected = [1, 2, 3, 4, 5, 6];
CollectionAssert.AreEqual(expected, set1.ToArray());

Check warning on line 309 in Containers.Test/OrderedSetTests.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_Containers&issues=AZ_wAmPs_hwkmKdaWrFk&open=AZ_wAmPs_hwkmKdaWrFk&pullRequest=35
}

[TestMethod]
Expand All @@ -321,7 +319,7 @@

Assert.AreEqual(5, set1.Count);
int[] expected = [1, 3, 4, 5, 6];
CollectionAssert.AreEqual(expected, set1.ToArray());

Check warning on line 322 in Containers.Test/OrderedSetTests.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_Containers&issues=AZ_wAmPs_hwkmKdaWrFl&open=AZ_wAmPs_hwkmKdaWrFl&pullRequest=35
}

[TestMethod]
Expand Down Expand Up @@ -392,7 +390,7 @@

Assert.AreEqual(4, set1.Count);
int[] expected = [1, 2, 5, 6];
CollectionAssert.AreEqual(expected, set1.ToArray());

Check warning on line 393 in Containers.Test/OrderedSetTests.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_Containers&issues=AZ_wAmPs_hwkmKdaWrFo&open=AZ_wAmPs_hwkmKdaWrFo&pullRequest=35
}

[TestMethod]
Expand Down Expand Up @@ -577,7 +575,7 @@
OrderedSet<int> clone = original.Clone();

// Verify they have the same content
CollectionAssert.AreEqual(original.ToArray(), clone.ToArray());

Check warning on line 578 in Containers.Test/OrderedSetTests.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_Containers&issues=AZ_wAmPs_hwkmKdaWrFp&open=AZ_wAmPs_hwkmKdaWrFp&pullRequest=35

// Verify they are independent
clone.Add(4);
Expand Down
4 changes: 1 addition & 3 deletions Containers.Test/RingBufferTests.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.Containers.Tests;

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

Expand Down Expand Up @@ -62,7 +60,7 @@
enqueued++;
}

Assert.IsTrue(enqueued >= 4, "Should accept at least the requested capacity before reporting full.");

Check warning on line 63 in Containers.Test/SpscRingBufferTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use 'Assert.IsGreaterThanOrEqualTo' instead of 'Assert.IsTrue'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmL6_hwkmKdaWrFB&open=AZ_wAmL6_hwkmKdaWrFB&pullRequest=35
Assert.IsFalse(buffer.TryEnqueue(999));
}

Expand Down Expand Up @@ -102,21 +100,21 @@
const int itemCount = 1_000_000;
SpscRingBuffer<int> buffer = new(1024);

Task producer = Task.Run(() =>
{
int produced = 0;
while (produced < itemCount)
{
if (buffer.TryEnqueue(produced))
{
produced++;
}
else
{
Thread.SpinWait(1);
}
}
});

Check warning on line 117 in Containers.Test/SpscRingBufferTests.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Consider using the overload that accepts a CancellationToken and pass 'TestContext.CancellationToken'

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmL6_hwkmKdaWrFC&open=AZ_wAmL6_hwkmKdaWrFC&pullRequest=35

Task<bool> consumer = Task.Run(() =>
{
Expand Down
4 changes: 1 addition & 3 deletions Containers/ContiguousCollection.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.Containers;

Expand Down Expand Up @@ -44,7 +42,7 @@
"CA1710:Identifiers should have correct suffix",
Justification = "ContiguousCollection is a known collection name"
)]
public class ContiguousCollection<T> : ICollection<T>, IReadOnlyCollection<T>, IReadOnlyList<T>

Check warning on line 45 in Containers/ContiguousCollection.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlyList<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

Check warning on line 45 in Containers/ContiguousCollection.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlyList<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

Check warning on line 45 in Containers/ContiguousCollection.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

'IReadOnlyList<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmRx_hwkmKdaWrF2&open=AZ_wAmRx_hwkmKdaWrF2&pullRequest=35
{
/// <summary>
/// The backing array that stores elements in contiguous memory.
Expand Down
4 changes: 1 addition & 3 deletions Containers/ContiguousMap.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.Containers;

Expand Down Expand Up @@ -76,7 +74,7 @@
/// </summary>
/// <param name="obj">The object to compare with the current entry.</param>
/// <returns>true if the specified object is equal to the current entry; otherwise, false.</returns>
public override bool Equals(object? obj) =>

Check warning on line 77 in Containers/ContiguousMap.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

All 'Equals' method overloads should be adjacent.

Check warning on line 77 in Containers/ContiguousMap.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

All 'Equals' method overloads should be adjacent.

Check warning on line 77 in Containers/ContiguousMap.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

All 'Equals' method overloads should be adjacent.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmQ1_hwkmKdaWrFy&open=AZ_wAmQ1_hwkmKdaWrFy&pullRequest=35
obj is Entry other
&& EqualityComparer<TKey>.Default.Equals(Key, other.Key)
&& EqualityComparer<TValue>.Default.Equals(Value, other.Value);
Expand Down
4 changes: 1 addition & 3 deletions Containers/ContiguousSet.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.Containers;

Expand Down Expand Up @@ -50,7 +48,7 @@
#if NET5_0_OR_GREATER
, IReadOnlySet<T>
#endif
, IReadOnlyCollection<T>

Check warning on line 51 in Containers/ContiguousSet.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlySet<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

Check warning on line 51 in Containers/ContiguousSet.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlySet<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

Check warning on line 51 in Containers/ContiguousSet.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

'IReadOnlySet<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmQH_hwkmKdaWrFu&open=AZ_wAmQH_hwkmKdaWrFu&pullRequest=35
{
/// <summary>
/// The backing array that stores elements in contiguous memory.
Expand Down
4 changes: 1 addition & 3 deletions Containers/DelayLine.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.Containers;

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

Expand Down Expand Up @@ -32,7 +30,7 @@
"CA1710:Identifiers should have correct suffix",
Justification = "InsertionOrderCollection is a known collection name"
)]
public class InsertionOrderCollection<T> : ICollection<T>, IReadOnlyCollection<T>, IReadOnlyList<T>

Check warning on line 33 in Containers/InsertionOrderCollection.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlyList<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

Check warning on line 33 in Containers/InsertionOrderCollection.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlyList<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.
{
/// <summary>
/// The internal list that stores elements in insertion order.
Expand Down
4 changes: 1 addition & 3 deletions Containers/InsertionOrderMap.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.Containers;

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

Expand Down Expand Up @@ -37,7 +35,7 @@
#if NET5_0_OR_GREATER
, IReadOnlySet<T>
#endif
, IReadOnlyCollection<T>

Check warning on line 38 in Containers/InsertionOrderSet.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlySet<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

Check warning on line 38 in Containers/InsertionOrderSet.cs

View workflow job for this annotation

GitHub Actions / Build, Test & Release

'IReadOnlySet<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

Check warning on line 38 in Containers/InsertionOrderSet.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

'IReadOnlySet<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmRi_hwkmKdaWrF1&open=AZ_wAmRi_hwkmKdaWrF1&pullRequest=35
{
/// <summary>
/// The internal list that stores elements in insertion order.
Expand Down
4 changes: 1 addition & 3 deletions Containers/OrderedCollection.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.Containers;

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

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

Expand Down Expand Up @@ -39,7 +37,7 @@
#if NET5_0_OR_GREATER
, IReadOnlySet<T>
#endif
, IReadOnlyCollection<T>

Check warning on line 40 in Containers/OrderedSet.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

'IReadOnlySet<T>' implements 'IReadOnlyCollection<T>' so 'IReadOnlyCollection<T>' can be removed from the inheritance list.

See more on https://sonarcloud.io/project/issues?id=ktsu-dev_Containers&issues=AZ_wAmRE_hwkmKdaWrFz&open=AZ_wAmRE_hwkmKdaWrFz&pullRequest=35
{
/// <summary>
/// The internal list that stores elements in sorted order.
Expand Down
Loading
Loading