Skip to content

Conversation

gimlichael
Copy link
Member

@gimlichael gimlichael commented Jun 15, 2025

This pull request includes updates to dependencies, improvements to logging functionality, and enhancements to testing environments. The most significant changes involve upgrading package versions, refining the AddXunitTestLogging method for better handling of null ITestOutputHelper instances, and adding new test cases to ensure robust functionality.

Dependency Updates:

  • .docfx/Dockerfile.docfx: Upgraded the base image from nginx:1.27.5-alpine to nginx:1.28.0-alpine. [1] [2]
  • Directory.Packages.props: Updated multiple package versions, including Cuemon.Core, Cuemon.Extensions.AspNetCore, and Microsoft.NET.Test.Sdk to their latest versions for improved compatibility. [1] [2]

Logging Enhancements:

Testing Improvements:

Summary by CodeRabbit

  • Bug Fixes
    • Improved test logging to gracefully handle cases where test output is unavailable, preventing errors during test runs.
  • Chores
    • Updated multiple package dependencies to their latest compatible versions for all supported frameworks.
    • Upgraded Docker and test environment images to newer versions.
    • Enhanced CI workflow to ensure package restoration during testing.
  • Documentation
    • Added release notes and changelog entries for version 10.0.3, detailing recent improvements and dependency updates.
  • Tests
    • Added new tests to verify enhanced logging integration and output handling.

@gimlichael gimlichael self-assigned this Jun 15, 2025
@Copilot Copilot AI review requested due to automatic review settings June 15, 2025 15:53
Copy link

coderabbitai bot commented Jun 15, 2025

Walkthrough

This update increments package dependency versions, updates the nginx base image in the documentation Dockerfile, and enhances the AddXunitTestLogging method to better handle cases where the test output helper is unavailable. Additional tests verify these improvements, and release notes and changelogs are updated accordingly.

Changes

File(s) Change Summary
.docfx/Dockerfile.docfx, testenvironments.json Updated nginx Alpine image and test runner Docker image tags to newer versions.
Directory.Packages.props Incremented versions for multiple NuGet packages and Microsoft.Extensions dependencies for all relevant TFMs.
CHANGELOG.md, .nuget/Codebelt.Extensions.Xunit*/PackageReleaseNotes.txt Added entries for version 10.0.3, documenting dependency updates and internal improvements.
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs Modified AddXunitTestLogging to conditionally register logging providers based on accessor presence.
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs Changed logging logic to catch and ignore InvalidOperationException instead of throwing when output is missing.
test/Codebelt.Extensions.Xunit.Hosting.Tests/ServiceCollectionExtensions.cs Added two new tests to verify logging behavior with and without output helper accessor in host scenarios.
.github/workflows/pipelines.yml Added restore: true input parameter to test job for package restoration.

Sequence Diagram(s)

sequenceDiagram
    participant TestHost
    participant ServiceCollection
    participant AddXunitTestLogging
    participant ITestOutputHelperAccessor
    participant LoggerProvider

    TestHost->>ServiceCollection: ConfigureServices()
    ServiceCollection->>AddXunitTestLogging: AddXunitTestLogging()
    AddXunitTestLogging->>ServiceCollection: Check for ITestOutputHelperAccessor
    alt Accessor present
        AddXunitTestLogging->>LoggerProvider: Register with accessor
    else Accessor absent
        AddXunitTestLogging->>LoggerProvider: Register default provider
    end
    TestHost->>LoggerProvider: Retrieve logger
    LoggerProvider->>TestHost: Logger instance
Loading

Possibly related PRs

Poem

A bunny hopped through code so bright,
Upgraded packages left and right.
Docker images fresh and clean,
Logging flows now more serene.
Tests now run without a hitch—
Version bumps, a perfect pitch!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df2f03c and eee1ab6.

📒 Files selected for processing (1)
  • src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: call-build (Debug) / 🛠️ Build
  • GitHub Check: call-build (Release) / 🛠️ Build
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR delivers a service update by upgrading dependencies, enhancing test logging robustness, and expanding test coverage.

  • Bumped Docker base images and library package versions for compatibility.
  • Made AddXunitTestLogging tolerant of a null ITestOutputHelper and improved the logger to swallow inactive-test errors.
  • Added host-based test cases and updated the Docker test runner image.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
testenvironments.json Updated the Ubuntu Docker test runner image tag to net8.0.411-9.0.301.
test/Codebelt.Extensions.Xunit.Hosting.Tests/ServiceCollectionExtensions.cs Introduced two new host-based [Fact] tests for AddXunitTestLogging.
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs Wrapped TestOutput.WriteLine in a try/catch to suppress InvalidOperationException.
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs Added conditional registration of the XunitTestLoggerProvider when an ITestOutputHelperAccessor is present.
Directory.Packages.props Upgraded multiple Cuemon.*, Microsoft.NET.Test.Sdk, and related package versions.
.docfx/Dockerfile.docfx Bumped nginx image from 1.27.5-alpine to 1.28.0-alpine.
CHANGELOG.md Added the 10.0.3 entry summarizing dependency and logging updates.
.nuget/*/PackageReleaseNotes.txt Updated all sub-package release notes to Version 10.0.3 and adjusted ALM/change sections.
Comments suppressed due to low confidence (2)

test/Codebelt.Extensions.Xunit.Hosting.Tests/ServiceCollectionExtensions.cs:127

  • Consider adding a test where ITestOutputHelperAccessor is registered but its TestOutput remains null to verify that no exception is thrown and no log entries are produced.
[Fact]

CHANGELOG.md:16

  • [nitpick] The changelog notes the logging change but omits the Docker test runner image bump and newly added host-based tests; consider adding entries to document those updates.
- AddXunitTestLogging method on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to use same logic as the overload equivalent and be forgiving when ITestOutputHelper is null (before an InvalidOperationException was thrown)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (5)
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (1)

26-45: Conditional branch duplicates the same logging setup – extract to reduce repetition

The two branches differ only in how the ILoggerProvider instance is created. Consider moving the common
builder.SetMinimumLevel(minimumLevel) call outside the if/else and extracting the provider-creation logic to a local
function to keep the method compact.

-                services.AddLogging(builder =>
-                {
-                    builder.SetMinimumLevel(minimumLevel);
-                    builder.Services.AddSingleton<ILoggerProvider>(provider =>
-                    {
-                        var accessor = provider.GetRequiredService<ITestOutputHelperAccessor>();
-                        return new XunitTestLoggerProvider(accessor);
-                    });
-                });
+                services.AddLogging(builder =>
+                {
+                    builder.SetMinimumLevel(minimumLevel);
+                    builder.Services.AddSingleton<ILoggerProvider>(CreateProvider);
+                });
...
-                services.AddLogging(builder =>
-                {
-                    builder.SetMinimumLevel(minimumLevel);
-                    builder.AddProvider(new XunitTestLoggerProvider());
-                });
+                services.AddLogging(builder =>
+                {
+                    builder.SetMinimumLevel(minimumLevel);
+                    builder.AddProvider(CreateProvider(null));
+                });

This keeps the two paths easier to maintain and guarantees they never diverge unintentionally.

CHANGELOG.md (1)

14-17: Minor grammar nit – missing article

“to use same logic” ➜ “to use the same logic”

- - AddXunitTestLogging method on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to use same logic as the overload equivalent and be forgiving when ITestOutputHelper is null
+ - AddXunitTestLogging method on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to use **the** same logic as the overload equivalent and be forgiving when ITestOutputHelper is null
🧰 Tools
🪛 LanguageTool

[uncategorized] ~16-~16: You might be missing the article “the” here.
Context: ...tensions.Xunit.Hosting namespace to use same logic as the overload equivalent and be...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

.nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (1)

5-8: Release-notes wording – same missing article

Same sentence as in the changelog – add “the”.

- - CHANGED AddXunitTestLogging method on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to use same logic as the overload equivalent ...
+ - CHANGED AddXunitTestLogging method on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to use **the** same logic as the overload equivalent ...
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: You might be missing the article “the” here.
Context: ...tensions.Xunit.Hosting namespace to use same logic as the overload equivalent and be...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

test/Codebelt.Extensions.Xunit.Hosting.Tests/ServiceCollectionExtensions.cs (2)

130-141: Add null-checks and assert expected entry count

Before accessing the store and its first element, add explicit Assert.NotNull validations.
Additionally, you expect exactly one log entry; asserting the count (or using Single()) conveys that intent more clearly than First().

@@
-    var logger = test.Host.Services.GetRequiredService<ILogger<ServiceCollectionExtensions>>();
-    logger.LogInformation("Test");
-
-    var store = logger.GetTestStore();
-
-    Assert.Equal("Information: Test", store.Query().First().Message);
+    var logger = test.Host.Services.GetRequiredService<ILogger<ServiceCollectionExtensions>>();
+    logger.LogInformation("Test");
+
+    var store = logger.GetTestStore();
+
+    Assert.NotNull(logger);
+    Assert.NotNull(store);
+    Assert.Single(store.Query());
+    Assert.Equal("Information: Test", store.Query().Single().Message);

152-160: Replicate the stronger assertions here as well

Mirror the additional null-checks and count assertion in the second host-based test for consistency and clarity.

@@
-    var store = logger.GetTestStore();
-
-    Assert.Equal("Information: Test", store.Query().First().Message);
+    var store = logger.GetTestStore();
+
+    Assert.NotNull(logger);
+    Assert.NotNull(store);
+    Assert.Single(store.Query());
+    Assert.Equal("Information: Test", store.Query().Single().Message);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 956a241 and 0475464.

📒 Files selected for processing (11)
  • .docfx/Dockerfile.docfx (2 hunks)
  • .nuget/Codebelt.Extensions.Xunit.App/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt (1 hunks)
  • CHANGELOG.md (1 hunks)
  • Directory.Packages.props (2 hunks)
  • src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (1 hunks)
  • src/Codebelt.Extensions.Xunit.Hosting/XunitTestLogger.cs (1 hunks)
  • test/Codebelt.Extensions.Xunit.Hosting.Tests/ServiceCollectionExtensions.cs (1 hunks)
  • testenvironments.json (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
.nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
.nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
.nuget/Codebelt.Extensions.Xunit.App/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
.nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
Directory.Packages.props (1)
Learnt from: gimlichael
PR: codebeltnet/xunit#17
File: src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj:22-26
Timestamp: 2024-10-09T14:10:40.721Z
Learning: In the `src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj` file, only certain .NET 8 packages are available in version 8.0.1, while others remain at 8.0.0, so package versions may differ due to availability.
🧬 Code Graph Analysis (1)
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (1)
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLoggerProvider.cs (4)
  • XunitTestLoggerProvider (9-56)
  • XunitTestLoggerProvider (15-17)
  • XunitTestLoggerProvider (19-22)
  • XunitTestLoggerProvider (24-27)
🪛 LanguageTool
.nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt

[uncategorized] ~8-~8: You might be missing the article “the” here.
Context: ...tensions.Xunit.Hosting namespace to use same logic as the overload equivalent and be...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

CHANGELOG.md

[uncategorized] ~16-~16: You might be missing the article “the” here.
Context: ...tensions.Xunit.Hosting namespace to use same logic as the overload equivalent and be...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: call-build (Release) / 🛠️ Build
  • GitHub Check: call-build (Debug) / 🛠️ Build
🔇 Additional comments (7)
testenvironments.json (1)

12-12: Bump Docker test image version
The Docker-Ubuntu environment now references gimlichael/ubuntu-testrunner:net8.0.411-9.0.301, aligning with the updated .NET SDK versions.

.docfx/Dockerfile.docfx (1)

1-1: Upgrade nginx base image
Both the base and final stages have been updated to nginx:1.28.0-alpine. This aligns with the broader dependency bump—please verify that this version is available and compatible with your doc hosting setup.

Also applies to: 11-11

.nuget/Codebelt.Extensions.Xunit.Hosting.AspNetCore/PackageReleaseNotes.txt (1)

1-6: Add release notes for v10.0.3
New entry for version 10.0.3 correctly documents the dependency upgrades under ALM. Format and placement are consistent with previous entries.

.nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt (1)

1-6: Add release notes for v10.0.3
The version header and ALM note are added in line with other Codebelt.Extensions.Xunit packages.

.nuget/Codebelt.Extensions.Xunit.App/PackageReleaseNotes.txt (1)

1-6: Add release notes for v10.0.3
New version entry and ALM change align with the overall service update.

src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (1)

26-27: Order-of-registration gotcha

services.Any(sd => sd.ServiceType == typeof(ITestOutputHelperAccessor)) only sees registrations added before the
current call. If the accessor is registered after AddXunitTestLogging, the method falls back to the “no accessor”
branch and you silently lose directed output.

Document this requirement in XML-comments or throw if the accessor is registered later to avoid surprise behaviour.

Directory.Packages.props (1)

7-11: Confirm transitive compatibility after version bumps

Several foundational packages (Microsoft.Extensions.*, xunit.runner.visualstudio, Microsoft.AspNetCore.TestHost)
were bumped to 9.0.6/8.0.17. These are normally safe, but they occasionally introduce binding-redirect issues when
running tests under older SDKs.

Please run the test suite on all supported TFMs to ensure there are no version-load exceptions at startup.

Also applies to: 23-33, 40-40

Copy link

codecov bot commented Jun 15, 2025

Codecov Report

Attention: Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.09%. Comparing base (956a241) to head (eee1ab6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...debelt.Extensions.Xunit.Hosting/XunitTestLogger.cs 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   91.99%   92.09%   +0.10%     
==========================================
  Files          48       48              
  Lines         937      949      +12     
  Branches      122      122              
==========================================
+ Hits          862      874      +12     
  Misses         65       65              
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (2)

26-37: Conditional branch still duplicates logger-configuration logic

After the refactor, both paths (AddTestOutputHelperAccessor and the else block) still repeat the SetMinimumLevel call and add a provider differing only by constructor argument.
Consider extracting the common builder.SetMinimumLevel(minimumLevel) and provider-registration into a single helper (e.g., a local function that receives a Func<IServiceProvider, ILoggerProvider>). This removes duplication and makes future changes (e.g., adding filters) less error-prone.


56-67: Second overload contains the same duplication pattern

The same two-branch duplication exists here. Consolidating as suggested above will keep both overloads aligned and avoid diverging behaviour if one branch is updated but the other is forgotten.

🧹 Nitpick comments (1)
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (1)

26-37: Order-of-registration edge case

Because the decision to use AddTestOutputHelperAccessor is based on current presence of ITestOutputHelperAccessor, calling AddXunitTestLogging before registering the accessor will silently fall back to the “no-accessor” provider and never switch, leading to lost test output.
You can make the registration resilient to ordering by always registering a provider that resolves ITestOutputHelperAccessor lazily:

builder.Services.AddSingleton<ILoggerProvider>(sp =>
{
    var accessor = sp.GetService<ITestOutputHelperAccessor>();
    return accessor != null
        ? new XunitTestLoggerProvider(accessor)
        : new XunitTestLoggerProvider();
});

This removes the need for the upfront Any check altogether.

Also applies to: 56-67

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eca1ee5 and df2f03c.

📒 Files selected for processing (1)
  • src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (1)
src/Codebelt.Extensions.Xunit.Hosting/XunitTestLoggerProvider.cs (4)
  • XunitTestLoggerProvider (9-56)
  • XunitTestLoggerProvider (15-17)
  • XunitTestLoggerProvider (19-22)
  • XunitTestLoggerProvider (24-27)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: call-test (ubuntu-24.04, Debug) / 🧪 Test
  • GitHub Check: call-test (windows-2022, Release) / 🧪 Test
  • GitHub Check: call-test (ubuntu-24.04, Release) / 🧪 Test
  • GitHub Check: call-test (windows-2022, Debug) / 🧪 Test
  • GitHub Check: call-pack (Debug) / 📦 Pack
  • GitHub Check: call-pack (Release) / 📦 Pack

Copy link

@gimlichael gimlichael merged commit 2dbc6a2 into main Jun 15, 2025
14 of 15 checks passed
@gimlichael gimlichael deleted the v10.0.3/service-update branch June 15, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant