Member-only story
How to Fix File is not `gofumpt`-ed (gofumpt) error
Mar 16, 2021
gofumpt is golang linter. It’s a stricter version of gofmt.
The linter errors are hard to understand sometimes. One such error is that the File is not gofumpt-ed.
Solution
- Install gofumpt
- run
gofumpt
on the troubled files. gofumpt -w <fileame>
- If you still see an error, particularly on linter wsl, then its likely cause is an empty line at the beginning/end of a block (function, switch-case, etc)