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

only write fmt if changed #470

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Conversation

alixander
Copy link
Collaborator

@alixander alixander commented Dec 19, 2022

fixes #469

match behavior of gofmt: https://github.com/golang/go/blob/master/src/cmd/gofmt/gofmt.go#L266

tested the original issue's command and confirmed it only writes once as expected

Screen Shot 2022-12-19 at 1 18 17 PM

@alixander alixander requested a review from nhooyr December 19, 2022 21:20
@kamok
Copy link

kamok commented Dec 20, 2022

@alixander Nice job, we're going on holidays till next year, so I'll wait for release. Thank you.

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.

d2 fmt to stop modifying the file when there is no change
2 participants