Skip to content

Print violations to stdout, everything else to stderr #484

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

Merged
merged 5 commits into from
Apr 15, 2025

Conversation

micheleorselli
Copy link
Member

@micheleorselli micheleorselli commented Apr 12, 2025

Here the output is divided between STDOUT and STDERR, in particular:

  • the list of violations is printed on stdout
  • everything else on stderr

This has several benefits

  • we can remove the $onlyError logic scattered in the code
  • the output now can be piped to other commands or in a file and in case of json/gitlab format you end up having a valid json

Copy link

codecov bot commented Apr 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.42%. Comparing base (d7f99f7) to head (04d3888).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #484      +/-   ##
============================================
- Coverage     95.47%   95.42%   -0.06%     
+ Complexity      640      621      -19     
============================================
  Files            73       73              
  Lines          1724     1704      -20     
============================================
- Hits           1646     1626      -20     
  Misses           78       78              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@micheleorselli micheleorselli marked this pull request as ready for review April 12, 2025 21:42
Copy link
Member

@AlessandroMinoccheri AlessandroMinoccheri left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@micheleorselli micheleorselli changed the base branch from move_first_fail_in_runner to main April 15, 2025 08:24
@micheleorselli micheleorselli force-pushed the split_output_between_stdout_and_stderr branch from 092d226 to 04d3888 Compare April 15, 2025 21:30
@micheleorselli micheleorselli merged commit d34dd6d into main Apr 15, 2025
34 checks passed
@micheleorselli micheleorselli deleted the split_output_between_stdout_and_stderr branch April 18, 2025 12:41
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