gofmt formatter doesn't clear quickfix list when all errors are fixed
- Dominant language
- Vim Script
- Stars
- 1.1k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
(Forwarding a report from someone else)
I am using the codefmt plugin for Go, by including:
``` vim
Glug codefmt gofmt_executable="goimports"
Glug codefmt-google
autocmd FileType go AutoFormatBuffer gofmt
```
And it looks like it doesn't clear the quick fix list when all errors are fixed. E.g.:
I have 3 errors, and if I save, the quick fix window shows the three of them.
If I fix 1, and save, the quick fix window correctly shows only two of them.
If now I fix the 2 remaining ones, and save, the quick fix window doesn't update at all.
It looks like we only call "setqflist" in the case of errors:
https://github.com/google/vim-codefmt/blob/master/autoload/codefmt.vim#L320
but never clear it if there are no errors.
Contributor guide
Research direction
Start in autoload/codefmt.vim around line 320, where the issue reports that setqflist is called only when errors exist. Reproduce the save workflow with gofmt or goimports, then verify that fixing the final error clears the quickfix list as well as updating it for remaining errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100