You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR successfully re-adds the --disable-logo command line flag functionality that appears to have been missing. The implementation is clean and follows the existing patterns in the codebase.
✅ Strengths
Good Architecture: The DisableLogoCommandProvider follows the established pattern of other command providers in the codebase
Proper Dependency Injection: The BannerCapability constructor correctly accepts the new ILoggerFactory parameter
Clear Documentation: The command line flag is already documented in /docs/docs/reference/command-line-flags.md
Simple Logic: The banner suppression logic is straightforward and easy to understand
Consistent Naming: Uses the same DisableLogo constant across both files
🔍 Code Quality Observations
BannerCapability.cs (lines 25-29):
The logic combines two conditions for hiding the logo: DisableLogo flag OR logger information level
The second condition loggerFactory.CreateLogger(nameof(BannerCapability)).IsEnabled(LogLevel.Information) seems unusual - typically you'd want to show MORE when logging is enabled, not hide the logo
TestApplicationBuilderExtensions.cs:
Clean registration of the new command provider on line 34
Proper parameter addition to BannerCapability constructor on line 48
⚠️Potential Issues
Logger Condition Logic: The condition || loggerFactory.CreateLogger(nameof(BannerCapability)).IsEnabled(LogLevel.Information) in BannerCapability.cs:26 seems counterintuitive. When Information-level logging is enabled, this will suppress the logo and only show runtime details. Is this the intended behavior? Usually you'd want more output when verbose logging is enabled, not less.
Missing Tests: There are no unit tests for the new DisableLogoCommandProvider or the updated banner logic. Consider adding tests for:
Command provider registration and options
Banner capability behavior with/without the disable flag
Banner capability behavior with different logger levels
🚀 Performance Considerations
Minimal performance impact - only adds a simple boolean check
Logger creation in the banner method is lightweight
🔒 Security Considerations
No security concerns identified
The command line option has zero arity (no arguments), so no injection risks
📋 Test Coverage Recommendations
Consider adding tests in the following areas:
// Test the command provider[Test]publicvoidDisableLogoCommandProvider_Should_Register_Correct_Option(){// Verify command line option registration}// Test banner behavior[Test]publicvoidBannerCapability_Should_Hide_Logo_When_DisableFlag_Set(){// Test banner output with --disable-logo flag}[Test]publicvoidBannerCapability_Should_Show_Logo_By_Default(){// Test default banner behavior}
🤔 Questions for Clarification
Logger Condition: Can you clarify the intended behavior of the logger condition? Should Information-level logging suppress or enhance the banner display?
Integration Testing: Have you manually tested that --disable-logo works as expected when running TUnit?
📝 Minor Suggestions
Consider adding XML documentation comments to the DisableLogoCommandProvider class
The comment on line 36 of TestApplicationBuilderExtensions.cs mentions "(replaces HideTestOutput, DisableLogo, DetailedStacktrace)" but DisableLogo is now a separate provider - this comment might need updating
🎯 Overall Assessment
This is a solid, straightforward implementation that restores important functionality. The code follows established patterns and is well-structured. The main concern is the logger condition logic which may need clarification. Once that's addressed and some tests are added, this would be ready for merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2735