Merge PR #1429: tools: Add ineffassign linter

* tools: Add ineffassign linter

This errors on assignments that don't actually do anything. i.e.

x, err := myFunc(1)
y, err = myFunc(2)

This will call out that the first function's call error was never
used.

* Fix makefile, add misspell to makefile
This commit is contained in:
Dev Ojha
2018-06-28 19:12:02 +02:00
committed by Christopher Goes
parent 2755c66545
commit 3e14868bd6
13 changed files with 81 additions and 28 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ test_cover:
@bash tests/test_cover.sh
test_lint:
gometalinter.v2 --disable-all --enable='golint' --enable='misspell' --enable='unconvert' --linter='vet:go vet -composites=false:PATH:LINE:MESSAGE' --enable='vet' --vendor ./...
gometalinter.v2 --disable-all --enable='golint' --enable='misspell' --enable='unconvert' --enable='ineffassign' --linter='vet:go vet -composites=false:PATH:LINE:MESSAGE' --enable='vet' --deadline=500s --vendor ./...
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
benchmark: