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

fix(cli): don't emit diagnostics in stdin mode, and exit with error code #3726

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

ematipico
Copy link
Member

Summary

Closes #3633

The CLI was incorrectly emitting diagnostics, which isn't supposed to happen in stdin mode. The formatter, for example, doesn't emit any diagnostics in case the contents aren't formatted.

Also, now the CLI exits with an error code in case the contents aren't formatted. This is in line with how prettier works.

Test Plan

I updated the current tests based on the new requirements

@ematipico ematipico requested review from a team August 27, 2024 10:59
@github-actions github-actions bot added A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Changelog Area: changelog labels Aug 27, 2024
crates/biome_cli/src/execute/std_in.rs Outdated Show resolved Hide resolved
@ematipico ematipico merged commit 17bb2fb into main Aug 27, 2024
13 checks passed
@ematipico ematipico deleted the fix/std-in-check branch August 27, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-CLI Area: CLI A-Diagnostic Area: diagnostocis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

biome check --stdin-file-path=file.ts doesn't return stdout
2 participants