Closed denizgursoy closed 1 year ago
How are you invoking gofumpt? gofumpt operates on a list of files, so if you give it a testdata/ file, it'll change it.
The short answer is no; we do skip vendor
directories when walking directory trees, but we don't skip testdata
.
https://github.com/mvdan/gofumpt/issues/250 has some more discussion on similar problems.
The more I think about it over time, the more I'm starting to think that we should skip both vendor
and testdata
directories when walking. If one really wants to format those, it would always possible to explicitly do so via gofumpt -l -w testdata vendor
, for example.
I have a .go source file in a testdata directory. When I execute gofumpt -l -w -extra . it does not ignore the files under testdata. Should it ignore? or How I can ignore the testdata folders