google / google/vim-codefmt

gofmt formatter doesn't clear quickfix list when all errors are fixed

Đang mở
#58 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Vim Script
Star
1.1k
Fork
102
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

(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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu trong autoload/codefmt.vim, khoảng dòng 320, nơi issue báo cáo rằng setqflist chỉ được gọi khi có lỗi. Tái hiện quy trình lưu bằng gofmt hoặc goimports, sau đó xác minh rằng việc sửa lỗi cuối cùng cũng xóa danh sách quickfix, đồng thời cập nhật danh sách này khi vẫn còn lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go, vim
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.