x/tools/gopls: hide gofmt -s diagnostics (and others?) in generated files #38467
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
Please answer these questions before submitting your issue. Thanks!
What did you do?
I generated code with
gqlgen
. One of the generated files (matches that DO NOT EDIT regex) contains non gofmt-simplified code.What did you expect to see?
No non-syntax diagnostics; the file is generated.
What did you see instead?
Diagnostics like: "redundant type from array, slice, or map composite literal"
Since I have quick fix on save enabled, and some diagnostics have suggested fixes, if I save the file then I'll accidentally change the file even though it's generated.
Other linters (staticcheck, golangci-lint) will ignore these files, and I can't recall seeing messages from
gopls
before in these files, so I'm not sure if it's a new issue or not.#36914 seems related, but was specifically for staticcheck.
Build info
Go info
The text was updated successfully, but these errors were encountered: