Skip to content

Simplify the console color output#94

Merged
spaze merged 1 commit intomainfrom
spaze/console-colors
Apr 14, 2026
Merged

Simplify the console color output#94
spaze merged 1 commit intomainfrom
spaze/console-colors

Conversation

@spaze
Copy link
Copy Markdown
Owner

@spaze spaze commented Apr 14, 2026

The [OK] string is always green, but the text following it isn't, unless it's the last line "The file is invalid"/"The file is valid" which is always full-color (red for error, green for ok).

@spaze spaze self-assigned this Apr 14, 2026
Copilot AI review requested due to automatic review settings April 14, 2026 20:25
Copy link
Copy Markdown

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 adjusts the CLI output formatting so success messages use a consistent green [OK] prefix while leaving the rest of the line uncolored (except the final “valid/invalid” summary lines, which remain fully colored).

Changes:

  • Introduce ConsolePrinter::ok() to print [OK] with green coloring.
  • Update SecurityTxtCheckHostCli to use [OK] for “expires in …” and “Signature valid …” lines, and adjust final summary wording to “The file is valid/invalid”.
  • Update CLI .phpt expectations and add contributor guidance about ANSI bytes in test heredocs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
tests/Check/SecurityTxtCheckHostCliTest.phpt Updates expected CLI output to match the new [OK] formatting and revised summary line.
src/Check/SecurityTxtCheckHostCli.php Switches certain progress/success messages from [Info] + green text to the new [OK] printer; tweaks final summary output.
src/Check/ConsolePrinter.php Adds ok() helper to standardize [OK] output formatting.
CLAUDE.md Documents how Tester writes .actual/.expected files and notes that .phpt heredocs contain raw ANSI escape bytes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Check/ConsolePrinter.php
Comment thread src/Check/ConsolePrinter.php
Comment thread src/Check/SecurityTxtCheckHostCli.php
The [OK] string is always green, but the text following it isn't, unless it's the last line "The file is invalid"/"The file is valid" which is always full-color (red for error, green for ok).
Copy link
Copy Markdown

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@spaze spaze merged commit e22363f into main Apr 14, 2026
10 checks passed
@spaze spaze deleted the spaze/console-colors branch April 14, 2026 22:14
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.

2 participants