1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

golangのflycheck

Posted at

flycheckが遅い・・・

いつからかはわからないが、cgoが入ると極端にコンパイル時間が長くなり非常に使いづらくなっていた。
gometalinterやgolangci-lintに切り替えても同じ現象でした。

checkerをdisableに

flycheckには、golang用のcheckerが複数ありgometalinterなどに変更しても、これらがdisableになっていなかった。
特にerrcheck/unconvert/megacheckが遅かったのでこの3つをdisableにすれば短時間のチェックができそうです。
注意点としてはsetqではなく、setq-defaultでないとdisableに出来ませんでした。


  (setq-default flycheck-disabled-checkers '(
                                     ;; go-gofmt
                                     ;; go-golint
                                     ;; go-vet
                                     ;; go-build
                                     ;; go-test
                                     go-errcheck
                                     go-unconvert
                                     go-megacheck
                                     ))

普段はgolangci-lintを使うようにしてこれらは全てdisableにしています。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?