Skip to content

fix: write the input to stdout when using stdin and there are no changes #5827

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 2 commits into from
May 24, 2025

Conversation

ldez
Copy link
Member

@ldez ldez commented May 23, 2025

Related to https://gophers.slack.com/archives/CS0TBRKPC/p1748028690710039

Currently, when using --stdin and a generated file modified by hand (yes, I know, it should not happen, but 🤷) the file is emptied.

@ldez ldez added this to the v2-unreleased milestone May 23, 2025
@ldez ldez added bug Something isn't working area: formatters/fmt labels May 23, 2025
@ldez ldez requested a review from bombsimon May 23, 2025 22:00
@ldez ldez merged commit cd315cd into golangci:main May 24, 2025
18 checks passed
@ldez ldez deleted the fix/fmt-sdtin-generated branch May 24, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: formatters/fmt bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants