Skip to content

Conversation

@basuke
Copy link

@basuke basuke commented Aug 16, 2025

Summary

  • Implements a new --quieter-after-error flag with -Q short option
  • Switches to quieter mode dynamically after the first error is encountered
  • Initially displays all output normally, then suppresses warnings and tasks after errors

Usage

xcodebuild test ... | xcbeautify --quieter-after-error
# or
xcodebuild test ... | xcbeautify -Q

Behavior

  • Before first error: Shows all output (tasks, warnings, errors, results)
  • After first error: Switches to quieter mode (only errors, results, test outcomes)
  • Maintains context: Task banners still appear for subsequent errors
  • Backward compatible: Does not affect existing --quiet and --quieter modes

Implementation Details

  • Added new CLI flag using ArgumentParser
  • Extended OutputHandler with error state tracking
  • Dynamic mode switching based on error detection
  • Comprehensive test coverage for all scenarios

Test plan

  • All existing tests pass
  • New tests cover the feature behavior
  • Code passes SwiftFormat linting
  • Build succeeds without warnings

🤖 Generated with Claude Code

Implements a new flag that switches to quieter mode after the first error
is encountered. Initially displays all output normally, but after an error
occurs, only shows errors, results, and test outcomes (warnings and regular
tasks are suppressed).

- Add --quieter-after-error flag with -Q short option
- Modify OutputHandler to track error state and dynamically switch modes
- Add comprehensive tests covering the new behavior
- Maintains backward compatibility with existing quiet/quieter modes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@basuke basuke requested a review from cpisciotta as a code owner August 16, 2025 23:46
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