Skip to content
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

Write summary messages to stderr when fixing via stdin (instead of omitting them) #7838

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Oct 6, 2023

Previously we just omitted diagnostic summaries when using --fix or --diff with a stdin file. Now, we still write the summaries to stderr instead of the main writer (which is generally stdout but could be changed by --output-file).

@@ -208,6 +208,7 @@ pub fn check(args: CheckCommand, log_level: LogLevel) -> Result<ExitStatus> {
}
_ => Box::new(BufWriter::new(io::stdout())),
};
let stderr_writer = Box::new(BufWriter::new(io::stderr()));
Copy link
Member Author

Choose a reason for hiding this comment

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

Should I move this down? Maybe. Should we write other things to stderr? Maybe.

@zanieb
Copy link
Member Author

zanieb commented Oct 6, 2023

Useful for testing in #7790 and arguably a better UX.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

@zanieb zanieb merged commit 3c25d26 into main Oct 6, 2023
16 checks passed
@zanieb zanieb deleted the zanie/stderr-summary branch October 6, 2023 17:11
zanieb added a commit that referenced this pull request Oct 6, 2023
konstin pushed a commit that referenced this pull request Oct 11, 2023
…itting them) (#7838)

Previously we just omitted diagnostic summaries when using `--fix` or
`--diff` with a stdin file. Now, we still write the summaries to stderr
instead of the main writer (which is generally stdout but could be
changed by `--output-file`).
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