Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9f1f8be
♻️ refactor: simplify file handling in benchmark workspace
gimlichael Dec 14, 2025
b0f881d
🧹 refactor: remove danish culture from benchmark options
gimlichael Dec 14, 2025
d5809b9
✨ enhance benchmark run method with service configurator
gimlichael Dec 14, 2025
9168aea
♻️ conditionally suppress console status messages in services
gimlichael Dec 14, 2025
84a2fcb
♻️ skip entry assembly depending tests when running under resharper
gimlichael Dec 14, 2025
1e0ff38
🧹 remove danish culture info test from benchmark options
gimlichael Dec 14, 2025
6fea611
✨ add methods to get benchmark reports and tuning paths
gimlichael Dec 14, 2025
7a9dfe6
✨ add skip option for benchmarks with existing reports
gimlichael Dec 14, 2025
408f808
✨ add option to skip benchmarks with existing reports
gimlichael Dec 14, 2025
0e0d6be
:arrow_up: bump dependencies
gimlichael Dec 14, 2025
d5a7839
:package: updated NuGet package definition
gimlichael Dec 14, 2025
d846b10
:art: update icon for benchmarkdotnet console application
gimlichael Dec 14, 2025
47dd6f7
:speech_balloon: updated community health pages
gimlichael Dec 14, 2025
c4d8af5
✨ update main author email in Directory.Build.props
gimlichael Dec 14, 2025
e4dd07c
:white_check_mark: make SuppressStatusMessages test build-config aware
gimlichael Dec 14, 2025
e106a28
Update .nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageRele…
gimlichael Dec 14, 2025
1f97e1a
Update CHANGELOG.md
gimlichael Dec 14, 2025
45ea81d
:white_check_mark: enable skipping benchmarks with reports
gimlichael Dec 14, 2025
f54af1e
✨ add guidelines to avoid internalsvisibleto in tests
gimlichael Dec 14, 2025
e7975bc
:bug: filter out benchmark run files from tuning reports directory
gimlichael Dec 14, 2025
852937f
🔧 use 'using' declaration for host in benchmark run method
gimlichael Dec 14, 2025
5f3e63e
✨ improve benchmark skipping logic and add directory existence check
gimlichael Dec 14, 2025
d7f1dd0
Merge branch 'v1.1.0/worker-flexibility' of https://github.com/codebe…
gimlichael Dec 14, 2025
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
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to `Classlibrary1`
# Contributing to `BenchmarkDotNet Extensions by Codebelt`
When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.

Expand Down Expand Up @@ -48,5 +48,5 @@ That is, in pursuit of the items on the left we have found the items on the righ
[Manifesto for Software Craftsmanship](https://manifesto.softwarecraftsmanship.org/) is the originator of this text.

## License
By contributing to `ClassLibrary1`, you agree that your contributions will be licensed
By contributing to `BenchmarkDotNet Extensions by Codebelt`, you agree that your contributions will be licensed
under the MIT license.
31 changes: 31 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,37 @@ namespace Codebelt.Extensions.BenchmarkDotNet
- Before overriding methods, verify that the method is virtual or abstract; this rule also applies to mocks.
- Never mock IMarshaller; always use a new instance of JsonMarshaller.

## 9. Avoid `InternalsVisibleTo` in Tests

- **Do not** use `InternalsVisibleTo` to access internal types or members from test projects.
- Prefer **indirect testing via public APIs** that depend on the internal implementation (public facades, public extension methods, or other public entry points).

### Preferred Pattern

**Pattern name:** Public Facade Testing (also referred to as *Public API Proxy Testing*)

**Description:**
Internal classes and methods must be validated by exercising the public API that consumes them. Tests should assert observable behavior exposed by the public surface rather than targeting internal implementation details directly.

### Example Mapping

- **Internal helper:** `DelimitedString` (internal static class)
- **Public API:** `TestOutputHelperExtensions.WriteLines()` (public extension method)
- **Test strategy:** Write tests for `WriteLines()` and verify its public behavior. The internal call to `DelimitedString.Create()` is exercised implicitly.

### Benefits

- Avoids exposing internal types to test assemblies.
- Ensures tests reflect real-world usage patterns.
- Maintains strong encapsulation and a clean public API.
- Tests remain resilient to internal refactoring as long as public behavior is preserved.

### When to Apply

- Internal logic is fully exercised through existing public APIs.
- Public entry points provide sufficient coverage of internal code paths.
- The internal implementation exists solely as a helper or utility for public-facing functionality.

---
description: 'Writing Performance Tests in Codebelt.Extensions.BenchmarkDotNet'
applyTo: "tuning/**, **/*Benchmark*.cs"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Version: 1.1.0
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

# Improvements
- EXTENDED BenchmarkProgram class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace to support an optional service configurator delegate for customizing the IServiceCollection during host building
- EXTENDED BenchmarkWorker class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace to support skipping benchmarks that already have generated reports based on the BenchmarkWorkspaceOptions.SkipBenchmarksWithReports property
- CHANGED BenchmarkWorker class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace to conditionally suppress console status messages in services based on whether you are in a debugging session or not

Version: 1.0.0
Availability: .NET 10 and .NET 9

 
# New Features
- ADDED BenchmarkContext class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace that represents the command-line context for a benchmark run
- ADDED BenchmarkProgram class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace that provides the main entry point for hosting and running benchmarks using BenchmarkDotNet
Expand Down
Binary file modified .nuget/Codebelt.Extensions.BenchmarkDotNet.Console/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Version: 1.1.0
Availability: .NET 10 and .NET 9

# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)

# Bug Fixes
- FIXED BenchmarkWorkspaceOptions class in the Codebelt.Extensions.BenchmarkDotNet namespace so it no longer relies on Danish culture

# Improvements
- EXTENDED BenchmarkWorkspace class in the Codebelt.Extensions.BenchmarkDotNet namespace with two new static methods; GetReportsResultsPath and GetReportsTuningPath for retrieving the paths to the reports results and tuning directories respectively
- EXTENDED BenchmarkWorkspaceOptions class in the Codebelt.Extensions.BenchmarkDotNet namespace to include one new property; SkipBenchmarksWithReports that indicates whether benchmarks that already have generated reports should be skipped during execution

Version: 1.0.0
Availability: .NET 10 and .NET 9

 
# New Features
- ADDED BenchmarkWorkspace class in the Codebelt.Extensions.BenchmarkDotNet namespace that provides a default implementation of IBenchmarkWorkspace for discovering and handling assemblies and their generated artifacts in BenchmarkDotNet
- ADDED BenchmarkWorkspaceOptions class in the Codebelt.Extensions.BenchmarkDotNet namespace that specifies configuration options that is related to the BenchmarkWorkspace class
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

For more details, please refer to `PackageReleaseNotes.txt` on a per assembly basis in the `.nuget` folder.

## [1.1.0] - 2025-12-14

### Changed

- `BenchmarkWorkspace` class in the Codebelt.Extensions.BenchmarkDotNet namespace was extended with two new static methods; `GetReportsResultsPath` and `GetReportsTuningPath` for retrieving the paths to the reports results and tuning directories respectively,
- `BenchmarkWorkspaceOptions` class in the Codebelt.Extensions.BenchmarkDotNet namespace was extended with an additional new property; `SkipBenchmarksWithReports` that indicates whether benchmarks that already have generated reports should be skipped during execution,
- `BenchmarkProgram` class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace was extended to support an optional service configurator delegate for customizing the `IServiceCollection` during host building,
- `BenchmarkWorker` class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace was extended to support skipping benchmarks that already have generated reports based on the `BenchmarkWorkspaceOptions.SkipBenchmarksWithReports` property,
- `BenchmarkWorker` class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace was changed to conditionally suppress console status messages in services based on whether you are in a debugging session or not.

### Fixed

- `BenchmarkWorkspaceOptions` class in the Codebelt.Extensions.BenchmarkDotNet namespace was fixed so it no longer relies on Danish culture.

## [1.0.0] - 2025-12-12

This is the initial stable release of the `Codebelt.Extensions.BenchmarkDotNet` and `Codebelt.Extensions.BenchmarkDotNet.Console` packages.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<IsToolingProject>$(MSBuildProjectDirectory.ToLower().StartsWith('$(MSBuildThisFileDirectory.ToLower())tooling'))</IsToolingProject>
<IsLinux>$([MSBuild]::IsOSPlatform('Linux'))</IsLinux>
<IsWindows>$([MSBuild]::IsOSPlatform('Windows'))</IsWindows>
<IsMainAuthor Condition="'$(EMAIL)' == 'classlibrary1@dot.net'">true</IsMainAuthor>
<IsMainAuthor Condition="'$(EMAIL)' == 'michael@geekle.io'">true</IsMainAuthor>
<SkipSignAssembly>false</SkipSignAssembly>
<PackageReleaseNotesFile>..\..\.nuget\$(MSBuildProjectName)\PackageReleaseNotes.txt</PackageReleaseNotesFile>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.15.8" />
<PackageVersion Include="Codebelt.Bootstrapper.Console" Version="5.0.1" />
<PackageVersion Include="Codebelt.Extensions.Xunit.App" Version="11.0.2" />
<PackageVersion Include="Cuemon.Core" Version="10.1.0" />
<PackageVersion Include="Cuemon.Core" Version="10.1.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="MinVer" Version="6.0.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,21 @@ static BenchmarkProgram()
/// </remarks>
public static void Run(string[] args, Action<BenchmarkWorkspaceOptions> setup = null)
{
Run<BenchmarkWorkspace>(args, setup);
Run(args, null, setup);
}

/// <summary>
/// Runs benchmarks using the default <see cref="BenchmarkWorkspace"/> implementation.
/// </summary>
/// <param name="args">The command-line arguments passed to the application.</param>
/// <param name="serviceConfigurator">The delegate that will be invoked to configure additional services in the <see cref="IServiceCollection"/>.</param>
/// <param name="setup">The <see cref="BenchmarkWorkspaceOptions"/> which may be configured.</param>
/// <remarks>
/// This method configures the host builder with the necessary services, builds the host, and runs it to execute benchmarks.
/// </remarks>
public static void Run(string[] args, Action<IServiceCollection> serviceConfigurator = null, Action<BenchmarkWorkspaceOptions> setup = null)
{
Run<BenchmarkWorkspace>(args, serviceConfigurator, setup);
}

/// <summary>
Expand All @@ -56,14 +70,30 @@ public static void Run(string[] args, Action<BenchmarkWorkspaceOptions> setup =
/// This method configures the host builder with the necessary services, builds the host, and runs it to execute benchmarks.
/// </remarks>
public static void Run<TWorkspace>(string[] args, Action<BenchmarkWorkspaceOptions> setup = null) where TWorkspace : class, IBenchmarkWorkspace
{
Run<TWorkspace>(args, null, setup);
}

/// <summary>
/// Runs benchmarks using a custom implementation of <see cref="IBenchmarkWorkspace"/>.
/// </summary>
/// <typeparam name="TWorkspace">The type of the workspace that implements <see cref="IBenchmarkWorkspace"/>.</typeparam>
/// <param name="args">The command-line arguments passed to the application.</param>
/// <param name="serviceConfigurator">The delegate that will be invoked to configure additional services in the <see cref="IServiceCollection"/>.</param>
/// <param name="setup">The <see cref="BenchmarkWorkspaceOptions"/> which may be configured.</param>
/// <remarks>
/// This method configures the host builder with the necessary services, builds the host, and runs it to execute benchmarks.
/// </remarks>
public static void Run<TWorkspace>(string[] args, Action<IServiceCollection> serviceConfigurator = null, Action<BenchmarkWorkspaceOptions> setup = null) where TWorkspace : class, IBenchmarkWorkspace
{
var hostBuilder = CreateHostBuilder(args);
hostBuilder.ConfigureServices(services =>
{
services.AddSingleton(new BenchmarkContext(args));
services.AddBenchmarkWorkspace<TWorkspace>(setup);
serviceConfigurator?.Invoke(services);
});
var host = hostBuilder.Build();
using var host = hostBuilder.Build();
host.Run();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Filters;

namespace Codebelt.Extensions.BenchmarkDotNet.Console
{
Expand Down Expand Up @@ -33,7 +37,7 @@
/// </remarks>
public override void ConfigureServices(IServiceCollection services)
{
services.Configure<ConsoleLifetimeOptions>(o => o.SuppressStatusMessages = true);
services.Configure<ConsoleLifetimeOptions>(o => o.SuppressStatusMessages = !BenchmarkProgram.IsDebugBuild);
}

/// <summary>
Expand All @@ -46,13 +50,41 @@
/// When arguments are provided, they are forwarded to <see cref="BenchmarkSwitcher"/> for selective execution.
/// After execution completes, the worker performs artifact post-processing.
/// </remarks>
public override Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken)

Check warning on line 53 in src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Refactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)

Check warning on line 53 in src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Refactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)

Check failure on line 53 in src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=benchmarkdotnet&issues=AZseFM2apUe2S2b8eeFN&open=AZseFM2apUe2S2b8eeFN&pullRequest=2
{
var options = serviceProvider.GetRequiredService<BenchmarkWorkspaceOptions>();
var workspace = serviceProvider.GetRequiredService<IBenchmarkWorkspace>();
var assemblies = workspace.LoadBenchmarkAssemblies();
var context = serviceProvider.GetRequiredService<BenchmarkContext>();

if (options.SkipBenchmarksWithReports)
{
var benchmarkTypes = assemblies.SelectMany(a => a.GetTypes().Where(t => t.Name.EndsWith("Benchmark", StringComparison.Ordinal))).ToList();
options.ConfigureBenchmarkDotNet(c =>
{
var tuningPath = BenchmarkWorkspace.GetReportsTuningPath(options);
if (!Directory.Exists(tuningPath)) { return c; }
var reports = Directory.EnumerateFiles(tuningPath);
foreach (var report in reports)
{
var filename = Path.GetFileNameWithoutExtension(report);
var potentialTypeFullName = filename.Split('-').FirstOrDefault();
if (string.IsNullOrWhiteSpace(potentialTypeFullName)) { continue; }

var potentialTypeName = potentialTypeFullName.Split('.').LastOrDefault();
if (string.IsNullOrWhiteSpace(potentialTypeName)) { continue; }

var matchingType = benchmarkTypes.FirstOrDefault(t => t.Name.Equals(potentialTypeName, StringComparison.OrdinalIgnoreCase));

if (matchingType != null)
{
c = c.AddFilter(new SimpleFilter(bc => bc.Descriptor.Type != matchingType));
}
}
return c;
});
}

try
{
if (context.Args.Length == 0)
Expand Down
37 changes: 31 additions & 6 deletions src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,34 @@
private static readonly Lock AssemblyResolverLock = new();
private static Dictionary<string, string> _assemblyLookup = new(StringComparer.OrdinalIgnoreCase);

/// <summary>
/// Gets the path to the BenchmarkDotNet results directory
/// </summary>
/// <param name="options">The <see cref="BenchmarkWorkspaceOptions"/> which configures repository paths, build modes and BenchmarkDotNet configuration.</param>
/// <returns>A string containing the full path to the 'results' directory within the artifacts path.</returns>
/// <remarks>
/// This path is constructed from the configured <see cref="IConfig.ArtifactsPath"/> and the "results" subdirectory.
/// </remarks>
public static string GetReportsResultsPath(BenchmarkWorkspaceOptions options)
{
Validator.ThrowIfInvalidOptions(options);
return Path.Combine(options.Configuration.ArtifactsPath, "results");
}

/// <summary>
/// Gets the path to the tuning folder where final benchmark reports are stored.
/// </summary>
/// <param name="options">The <see cref="BenchmarkWorkspaceOptions"/> which configures repository paths, build modes and BenchmarkDotNet configuration.</param>
/// <returns>A string representing the full path to the tuning reports directory.</returns>
/// <remarks>
/// This path is constructed from the configured <see cref="IConfig.ArtifactsPath"/> and the <see cref="BenchmarkWorkspaceOptions.RepositoryTuningFolder"/>.
/// </remarks>
public static string GetReportsTuningPath(BenchmarkWorkspaceOptions options)
{
Validator.ThrowIfInvalidOptions(options);
return Path.Combine(options.Configuration.ArtifactsPath, options.RepositoryTuningFolder);
}

/// <summary>
/// Initializes a new instance of the <see cref="BenchmarkWorkspace"/> class with the specified options.
/// </summary>
Expand Down Expand Up @@ -74,12 +102,10 @@
/// </remarks>
public void PostProcessArtifacts()
{
var reportsResultsPath = Path.Combine(_options.Configuration.ArtifactsPath, "results");
var reportsTuningPath = Path.Combine(_options.Configuration.ArtifactsPath, _options.RepositoryTuningFolder);
CleanupResults(reportsResultsPath, reportsTuningPath);
CleanupResults(GetReportsResultsPath(_options), GetReportsTuningPath(_options));
}

private static IEnumerable<Assembly> LoadAssemblies(string repositoryPath, string targetFrameworkMoniker, string benchmarkProjectSuffix, string repositoryTuningFolder, bool useDebugBuild)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)

Check warning on line 108 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)
{
var tuningDir = Path.Combine(repositoryPath, repositoryTuningFolder);
Directory.CreateDirectory(tuningDir);
Expand All @@ -95,7 +121,7 @@

var candidatePaths = Directory
.EnumerateFiles(tuningDir, $"*.{benchmarkProjectSuffix}.dll", SearchOption.AllDirectories)
.Where(path => path.IndexOf(buildSegment, StringComparison.OrdinalIgnoreCase) >= 0);

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Debug) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-build (Release) / 🛠️ Build

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (ubuntu-24.04-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-2025, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Debug) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-test (windows-11-arm, Release) / 🧪 Test

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

Check warning on line 124 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-codeql / 🛡️ Security Analysis

Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

foreach (var path in candidatePaths)
{
Expand All @@ -116,7 +142,7 @@
continue;
}

assemblies.Add(Assembly.LoadFrom(path));

Check warning on line 145 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Replace this call to 'Assembly.LoadFrom' with 'Assembly.Load'. (https://rules.sonarsource.com/csharp/RSPEC-3885)

Check warning on line 145 in src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

View workflow job for this annotation

GitHub Actions / call-sonarcloud / 🔬 Code Quality Analysis

Replace this call to 'Assembly.LoadFrom' with 'Assembly.Load'. (https://rules.sonarsource.com/csharp/RSPEC-3885)
}
catch
{
Expand Down Expand Up @@ -188,11 +214,10 @@

Directory.CreateDirectory(reportsTuningPath);

foreach (var file in Directory.GetFiles(reportsResultsPath).Where(s => !s.EndsWith(".lock")))
foreach (var file in Directory.GetFiles(reportsResultsPath).Where(f => !Path.GetFileNameWithoutExtension(f).StartsWith("BenchmarkRun", StringComparison.Ordinal)))
{
var targetFile = Path.Combine(reportsTuningPath, Path.GetFileName(file));
File.Delete(targetFile);
File.Move(file, targetFile);
File.Move(file, targetFile, true);
}

Directory.Delete(reportsResultsPath, recursive: true);
Expand Down
Loading
Loading