summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-03-30 23:28:19 +0100
committerGitHub <noreply@github.com>2017-03-30 23:28:19 +0100
commit6c97cd335b33d2160288b992602a0deda2ae5652 (patch)
treedd5d2350f79e9456618dae6746ad0a8c5ae23381
parent36f9631512fe164ae115c4a216d3cddbf81e6daa (diff)
parent43f24f4c012687a7771e334d4e25ebe407a512bf (diff)
downloadale-6c97cd335b33d2160288b992602a0deda2ae5652.zip
Merge pull request #429 from breed808/go
Add support for gosimple and staticcheck
-rw-r--r--README.md2
-rw-r--r--ale_linters/go/gosimple.vim9
-rw-r--r--ale_linters/go/staticcheck.vim9
-rw-r--r--doc/ale.txt2
4 files changed, 20 insertions, 2 deletions
diff --git a/README.md b/README.md
index f7ec48bc..bc00a88e 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,7 @@ name. That seems to be the fairest way to arrange this table.
| Elm | [elm-make](https://github.com/elm-lang/elm-make) |
| Erlang | [erlc](http://erlang.org/doc/man/erlc.html) |
| Fortran | [gcc](https://gcc.gnu.org/) |
-| Go | [gofmt -e](https://golang.org/cmd/gofmt/), [go vet](https://golang.org/cmd/vet/), [golint](https://godoc.org/github.com/golang/lint), [go build](https://golang.org/cmd/go/) |
+| Go | [gofmt -e](https://golang.org/cmd/gofmt/), [go vet](https://golang.org/cmd/vet/), [golint](https://godoc.org/github.com/golang/lint), [go build](https://golang.org/cmd/go/), [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple), [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) |
| Haml | [haml-lint](https://github.com/brigade/haml-lint)
| Haskell | [ghc](https://www.haskell.org/ghc/), [hlint](https://hackage.haskell.org/package/hlint), [hdevtools](https://hackage.haskell.org/package/hdevtools) |
| HTML | [HTMLHint](http://htmlhint.com/), [proselint](http://proselint.com/), [tidy](http://www.html-tidy.org/) |
diff --git a/ale_linters/go/gosimple.vim b/ale_linters/go/gosimple.vim
new file mode 100644
index 00000000..09ea40b8
--- /dev/null
+++ b/ale_linters/go/gosimple.vim
@@ -0,0 +1,9 @@
+" Author: Ben Reedy <https://github.com/breed808>
+" Description: gosimple for Go files
+
+call ale#linter#Define('go', {
+\ 'name': 'gosimple',
+\ 'executable': 'gosimple',
+\ 'command': 'gosimple %t',
+\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
+\})
diff --git a/ale_linters/go/staticcheck.vim b/ale_linters/go/staticcheck.vim
new file mode 100644
index 00000000..711e2ce2
--- /dev/null
+++ b/ale_linters/go/staticcheck.vim
@@ -0,0 +1,9 @@
+" Author: Ben Reedy <https://github.com/breed808>
+" Description: staticcheck for Go files
+
+call ale#linter#Define('go', {
+\ 'name': 'staticcheck',
+\ 'executable': 'staticcheck',
+\ 'command': 'staticcheck %t',
+\ 'callback': 'ale#handlers#HandleUnixFormatAsWarning',
+\})
diff --git a/doc/ale.txt b/doc/ale.txt
index 4aac58c0..8feb3eb8 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -119,7 +119,7 @@ The following languages and tools are supported.
* Elm: 'elm-make'
* Erlang: 'erlc'
* Fortran: 'gcc'
-* Go: 'gofmt -e', 'go vet', 'golint', 'go build'
+* Go: 'gofmt -e', 'go vet', 'golint', 'go build', 'gosimple', 'staticcheck'
* Haml: 'hamllint'
* Haskell: 'ghc', 'hlint'
* HTML: 'HTMLHint', 'proselint', 'tidy'