Closed perrito666 closed 1 year ago
which gofumpt version are you on? this should have been fixed a long time ago, with https://github.com/mvdan/gofumpt/issues/126. you can extract the version you're actually using via https://github.com/mvdan/gofumpt#contributing.
🤦 ok I might be at fault here
This is the version that was being used by goland
➜ gofumpt /tmp/f.go
package p
//gofumpt:diagnose
This is the system version
➜ gofumpt /tmp/f.go
package p
//gofumpt:diagnose version: v0.5.0 (go1.20.3) flags: -lang=v1 -modpath=
After getting rid of the spurious binary and pointing goland to the system one It works, sorry for the unnecessary noise
What steps will reproduce the issue?
Note I triggered this using gofumpt through goland but deactivating gofumpt as a watcher solves the issue so I suspect it is caused by it.
Declare variables with
// go:embed
directive, like so:Save
What is the expected result?
As
//go:embed
expects to be above a single variable, the above declaration should be left as is (orotherVariable
grouped with subsequent variables if any)What happens instead?
Which triggers the error
go:embed must be placed above a declaration of a single global variable