diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-05-30 14:56:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-30 14:56:59 +0100 |
commit | bc317a7be5e5c9db85b59c6377f3a9b9f034535c (patch) | |
tree | 0a6080cd4896f296809f3c5fe18761e9ca49b843 | |
parent | 7a89d0c97e8a6c75f6eb69f09f37a4e7e5ba9ec8 (diff) | |
parent | bfad5c9dc4f79528fb5cc33f860b0609d32f6989 (diff) | |
download | ale-bc317a7be5e5c9db85b59c6377f3a9b9f034535c.zip |
Merge pull request #595 from daenney/go-default-linters
go: Remove `staticcheck` and `go build` defaults
-rw-r--r-- | autoload/ale/linter.vim | 2 | ||||
-rw-r--r-- | doc/ale-go.txt | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim index d90c873e..09f1d597 100644 --- a/autoload/ale/linter.vim +++ b/autoload/ale/linter.vim @@ -23,7 +23,7 @@ let s:default_ale_linter_aliases = { " rpmlint is disabled by default because it can result in code execution. let s:default_ale_linters = { \ 'csh': ['shell'], -\ 'go': ['go build', 'gofmt', 'golint', 'gosimple', 'go vet', 'staticcheck'], +\ 'go': ['gofmt', 'golint', 'go vet'], \ 'help': [], \ 'rust': ['cargo'], \ 'spec': [], diff --git a/doc/ale-go.txt b/doc/ale-go.txt index 2e363a97..e8c8914e 100644 --- a/doc/ale-go.txt +++ b/doc/ale-go.txt @@ -5,13 +5,20 @@ ALE Go Integration *ale-go-options* ------------------------------------------------------------------------------- Integration Information -The `gometalinter` linter is disabled by default, and all other Go linters -supported by ALE are enabled by default. To enable `gometalinter`, update -|g:ale_linters| as appropriate: +The `gometalinter` linter is disabled by default. ALE enables `gofmt`, +`golint` and `go vet` by default. It also supports `staticcheck`, `go +build` and `gosimple`. + +To enable `gometalinter`, update |g:ale_linters| as appropriate: > " Enable all of the linters you want for Go. let g:ale_linters = {'go': ['gometalinter', 'gofmt']} < +A possible configuration is to enable `gometalinter` and `gofmt` but paired +with the `--fast` option, set by |g:ale_go_metalinter_options|. This gets you +the benefit of running a number of linters, more than ALE would by default, +while ensuring it doesn't run any linters known to be slow or resource +intensive. ------------------------------------------------------------------------------- gometalinter *ale-go-gometalinter* @@ -24,6 +31,11 @@ g:ale_go_gometalinter_options *g:ale_go_gometalinter_options* This variable can be changed to alter the command-line arguments to the gometalinter invocation. +Since `gometalinter` runs a number of linters that can consume a lot of +resources it's recommended to set this option to a value of `--fast` if you +use `gometalinter` as one of the linters in |g:ale_linters|. This disables a +number of linters known to be slow or consume a lot of resources. + ------------------------------------------------------------------------------- vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: |