Skip to content

ninja-xtask: show stdout and exit status for failed commands#32

Merged
MusicalNinjaDad merged 2 commits into
mainfrom
better_output
May 7, 2026
Merged

ninja-xtask: show stdout and exit status for failed commands#32
MusicalNinjaDad merged 2 commits into
mainfrom
better_output

Conversation

@MusicalNinjaDad
Copy link
Copy Markdown
Owner

No description provided.

@MusicalNinjaDad MusicalNinjaDad changed the title show stdout and exit status for failed commands ninja-xtask: show stdout and exit status for failed commands May 7, 2026
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • When building the formatted error string, consider including the full command (or at least its arguments) alongside cmd.name so failures are easier to trace back to the exact invocation.
  • In fail_output, asserting on multiple substrings of the formatted output makes this test somewhat brittle; you could instead assert on a smaller number of higher-level invariants (for example, presence of labeled stdout/stderr sections and exit status) to reduce coupling to the exact formatting.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- When building the formatted error string, consider including the full command (or at least its arguments) alongside `cmd.name` so failures are easier to trace back to the exact invocation.
- In `fail_output`, asserting on multiple substrings of the formatted output makes this test somewhat brittle; you could instead assert on a smaller number of higher-level invariants (for example, presence of labeled stdout/stderr sections and exit status) to reduce coupling to the exact formatting.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@MusicalNinjaDad MusicalNinjaDad merged commit 189bdd5 into main May 7, 2026
28 checks passed
@MusicalNinjaDad MusicalNinjaDad deleted the better_output branch May 7, 2026 14:38
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