-
Notifications
You must be signed in to change notification settings - Fork 291
Add --ansi option for explicit ANSI control #7107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add --ansi option to force Ansi output
Add --ansi option for explicit ANSI control
Dec 11, 2025
nohwnd
reviewed
Dec 12, 2025
...oft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf
Outdated
Show resolved
Hide resolved
Evangelink
reviewed
Dec 12, 2025
...oft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
Outdated
Show resolved
Hide resolved
Evangelink
reviewed
Dec 12, 2025
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf
Outdated
Show resolved
Hide resolved
Evangelink
reviewed
Dec 12, 2025
src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs
Outdated
Show resolved
Hide resolved
…d clearer descriptions Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
# Conflicts: # src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOption.cs # src/Platform/Microsoft.Testing.Platform/PublicAPI/PublicAPI.Unshipped.txt
Evangelink
reviewed
Dec 12, 2025
src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOption.cs
Outdated
Show resolved
Hide resolved
Evangelink
reviewed
Dec 12, 2025
...oft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
Outdated
Show resolved
Hide resolved
Evangelink
reviewed
Dec 12, 2025
...oft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporterCommandLineOptionsProvider.cs
Outdated
Show resolved
Hide resolved
…format Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Evangelink
reviewed
Dec 12, 2025
src/Platform/Microsoft.Testing.Platform/OutputDevice/TerminalOutputDevice.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
…umentValidator Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
nohwnd
reviewed
Dec 18, 2025
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/AnsiMode.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Evangelink
reviewed
Dec 18, 2025
src/Platform/Microsoft.Testing.Platform/CommandLine/OptionMode.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Evangelink
reviewed
Dec 18, 2025
src/Platform/Microsoft.Testing.Platform/CommandLine/TriStateMode.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
nohwnd
reviewed
Dec 18, 2025
Member
nohwnd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just comments that you don't have to address.
src/Platform/Microsoft.Testing.Platform/CommandLine/ActivationMode.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/TerminalTestReporter.cs
Outdated
Show resolved
Hide resolved
nohwnd
approved these changes
Dec 18, 2025
Member
nohwnd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^^
nohwnd
approved these changes
Dec 19, 2025
auto-merge was automatically disabled
December 19, 2025 12:38
Pull request was closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implementation Plan for --ansi option
TerminalTestReporterCommandLineOptionsProviderto add new--ansioption with argument arity of exactly one--ansioption to accept:auto,on,true,enable,1,off,false,disable,0.xlffiles with new localization entriesTerminalOutputDeviceto parse and use the new--ansioption value--no-ansiworking as beforeCommandLineOptionArgumentValidatorfor on/off/auto validationCommandLineOptionwith message parameter--no-ansias obsolete with suggestion to use--ansi offIsValidBooleanArgument) for options without auto modeIsValidBooleanAutoArgument)Summary
Successfully implemented the
--ansioption with the following behavior:--ansi auto(default): Auto-detect terminal capabilities--ansi on|true|enable|1: Force enable ANSI output (even when redirected)--ansi off|false|disable|0: Force disable ANSI output--no-ansi: Backward compatible, marked as obsolete with suggestion to use--ansi offAll tests added, code review passed, no security issues found. All PR feedback addressed including:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.