Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

Change linter to golangci-lint #146

Merged
merged 1 commit into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ setup_go_dependencies() {
echo -e "${YELLOW}INSTALL${END_COLOR} ${BOLD}go binaries${NORMAL} (may take a while)..." >&4
GOPATH="${PWD}/gopath" ${VIMCMD} +'GoUpdateBinaries' +'qall!'
echo
GOPATH="${PWD}/gopath" GOBIN="${PWD}/gobin" "${PWD}/gobin/gometalinter" --install --update
echo -e "${GREEN}DONE${END_COLOR} ${BOLD}go binaries${NORMAL}" >&4
set +e
GOPATH="${PWD}/gopath" GOBIN="${PWD}/gobin" "${PWD}/gobin/gocode" close 2>/dev/null
Expand Down
14 changes: 6 additions & 8 deletions config/lang/golang.vim
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ let s:go_tags_script_path = resolve(expand('<sfile>:h') . '/../../scripts/gotags
let s:go_tags_lock_path = resolve(expand('<sfile>:h') . '/../../tmp/gotagslock')

let g:go_auto_type_info = 0

let g:ale_go_gometalinter_options =
\ '--tests ' .
\ '--fast ' .
\ '--disable=gotype ' .
\ '--disable=gotypex ' .
\ '--exclude="should have comment" ' .
\ '--exclude="error return value not checked \(defer"'
let g:ale_go_golangci_lint_package = 1
let g:ale_go_golangci_lint_options = '--enable-all
\ --tests
\ --fast
\ --disable gochecknoglobals
\ --disable gochecknoinits'

function! golang#project_tags_path()
return s:go_tags_path . '/' . substitute(expand('%:p'), '/', '--', 'g') . '--tags'
Expand Down
2 changes: 1 addition & 1 deletion config/plugin/ale.vim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let g:ale_sign_info = '➟'
let g:ale_sign_column_always = 1

let g:ale_linters = {
\ 'go': ['go build', 'gofmt', 'gometalinter'],
\ 'go': ['go build', 'gofmt', 'golangci-lint'],
\ 'typescript': ['tsserver', 'typecheck'],
\ 'javascript': ['eslint'],
\}
Expand Down