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

removing empty lines isn't idempotent #40

Closed
mvdan opened this issue Nov 28, 2019 · 1 comment
Closed

removing empty lines isn't idempotent #40

mvdan opened this issue Nov 28, 2019 · 1 comment

Comments

@mvdan
Copy link
Owner

mvdan commented Nov 28, 2019

$ cat f.go
package p

func f() {
	var (
		i int
	)
}
$ cat f.go | gofumpt
package p

func f() {

	var i int

}
$ cat f.go | gofumpt | gofumpt
package p

func f() {
	var i int
}

One shouldn't require multiple runs of gofumpt to get the desired outcome. We should fix this edge case.

@briansorahan
Copy link

I just ran into this! I'll see if I can make time to whip up a PR.

@mvdan mvdan closed this as completed in b896b37 Dec 20, 2019
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

No branches or pull requests

2 participants