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

gofumpt -s no longer works #174

Closed
karelbilek opened this issue Dec 6, 2021 · 2 comments · Fixed by #176
Closed

gofumpt -s no longer works #174

karelbilek opened this issue Dec 6, 2021 · 2 comments · Fixed by #176
Milestone

Comments

@karelbilek
Copy link
Contributor

It seems gofumpt -s no longer works, which broke some of my scripts.

The readme claims that gofumpt is

stricter format than gofmt, while being backwards compatible

while this broke the backwards compatibility.

I understand that -s is now default, but the flag should IMO still exist (and do nothing?).

@karelbilek
Copy link
Contributor Author

Ah, I see that it's described here

#105

Well, OK.

@mvdan
Copy link
Owner

mvdan commented Dec 6, 2021

That's fair - a bit unnecessary to remove the flags outright. We can remove the code and UX complexity but still leave the flags declared as a warning/error. For -s we could print a warning and continue (as it is the default), and for -r we could fail with a helpful error. I believe @Oiyoo plans to fix this.

Oiyoo added a commit to Oiyoo/gofumpt that referenced this issue Dec 6, 2021
Oiyoo added a commit to Oiyoo/gofumpt that referenced this issue Dec 7, 2021
mvdan pushed a commit that referenced this issue Dec 12, 2021
This way, users calling -s or -r get a helpful message.
The use of -s can still let the tool work, for now.

Fixes #174.
@mvdan mvdan added this to the v0.2.1 milestone Dec 16, 2021
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 a pull request may close this issue.

2 participants