I use ale for golang linter and fixer.
After I upgraded ale to v3.0.0 or master(78fa93bd55be70c00d0342655bcdfada338e6e79) yesterday.
Something I don't know went wrong. v2.7.0 works well for me.
Here is the screenshot.
Reproducing the bug
My ale config in vimrc is
" ale {{{
let g:ale_set_quickfix = 1
let g:ale_open_list = 0
let g:ale_linters = {
\ 'python':['pylint'],
\ 'javascript':['eslint'],
\ 'typescript':['eslint', 'tsserver'],
\ 'java':[],
\ 'go': ['gofmt', 'golint', 'go vet']
\ }
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'python': ['yapf'],
\ 'go': ['gofmt'],
\ 'javascript':['eslint'],
\ 'typescript':['eslint'],
\ }
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%code%] %s [%severity%]'
let g:ale_lint_on_enter = 1
let g:ale_fix_on_save = 1
let g:ale_completion_enabled = 0
nmap <silent> <space>j <Plug>(ale_next_wrap)
nmap <silent> <space>k <Plug>(ale_previous_wrap)
" ale }}}
:ALEInfo
Current Filetype: go
Available Linters: ['bingo', 'gobuild', 'gofmt', 'golangci-lint', 'golint', 'gometalinter', 'gopls', 'gosimple', 'gotype', 'govet', 'golangserver', 'revive', 'staticcheck']
Linter Aliases:
'gobuild' -> ['go build']
'govet' -> ['go vet']
Enabled Linters: ['gofmt', 'golint', 'govet']
Ignored Linters: []
Suggested Fixers:
'gofmt' - Fix Go files with go fmt.
'goimports' - Fix Go files imports with goimports.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
Linter Variables:
let g:ale_go_go_executable = 'go'
let g:ale_go_golangci_lint_executable = 'golangci-lint'
let g:ale_go_golangci_lint_options = '--enable-all'
let g:ale_go_golangci_lint_package = 0
let g:ale_go_golint_executable = 'golint'
let g:ale_go_golint_options = ''
let g:ale_go_govet_options = ''
let g:ale_go_langserver_executable = 'go-langserver'
let g:ale_go_langserver_options = ''
Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_disable_lsp = 0
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_format = '[%code%] %s [%severity%]'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {'go': ['gofmt'], 'typescript': ['eslint'], '*': ['remove_trailing_lines', 'trim_whitespace'], 'javascript': ['eslint'], 'python': ['yapf']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {'go': ['gofmt', 'golint', 'go vet'], 'typescript': ['eslint', 'tsserver'], 'java': [], 'javascript': ['eslint'], 'python': ['pylint']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '[%code%] %s [%severity%]'
let g:ale_lsp_root = {}
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_sign_highlight_linenrs = 0
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
Information
VIM version
NVIM v0.4.4 Build type: Release LuaJIT 2.0.5
Operating System: macOS Catalina 10.15.6
What went wrong
I use ale for golang linter and fixer. After I upgraded ale to v3.0.0 or master(78fa93bd55be70c00d0342655bcdfada338e6e79) yesterday. Something I don't know went wrong. v2.7.0 works well for me. Here is the screenshot.
Reproducing the bug
My ale config in vimrc is
:ALEInfo
Current Filetype: go Available Linters: ['bingo', 'gobuild', 'gofmt', 'golangci-lint', 'golint', 'gometalinter', 'gopls', 'gosimple', 'gotype', 'govet', 'golangserver', 'revive', 'staticcheck'] Linter Aliases: 'gobuild' -> ['go build'] 'govet' -> ['go vet'] Enabled Linters: ['gofmt', 'golint', 'govet'] Ignored Linters: [] Suggested Fixers: 'gofmt' - Fix Go files with go fmt. 'goimports' - Fix Go files imports with goimports. 'remove_trailing_lines' - Remove all blank lines at the end of a file. 'trim_whitespace' - Remove all trailing whitespace characters at the end of every line. Linter Variables:
let g:ale_go_go_executable = 'go' let g:ale_go_golangci_lint_executable = 'golangci-lint' let g:ale_go_golangci_lint_options = '--enable-all' let g:ale_go_golangci_lint_package = 0 let g:ale_go_golint_executable = 'golint' let g:ale_go_golint_options = '' let g:ale_go_govet_options = '' let g:ale_go_langserver_executable = 'go-langserver' let g:ale_go_langserver_options = '' Global Variables:
let g:ale_cache_executable_check_failures = v:null let g:ale_change_sign_column_color = 0 let g:ale_command_wrapper = '' let g:ale_completion_delay = v:null let g:ale_completion_enabled = 0 let g:ale_completion_max_suggestions = v:null let g:ale_disable_lsp = 0 let g:ale_echo_cursor = 1 let g:ale_echo_msg_error_str = 'E' let g:ale_echo_msg_format = '[%code%] %s [%severity%]' let g:ale_echo_msg_info_str = 'Info' let g:ale_echo_msg_warning_str = 'W' let g:ale_enabled = 1 let g:ale_fix_on_save = 1 let g:ale_fixers = {'go': ['gofmt'], 'typescript': ['eslint'], '*': ['remove_trailing_lines', 'trim_whitespace'], 'javascript': ['eslint'], 'python': ['yapf']} let g:ale_history_enabled = 1 let g:ale_history_log_output = 1 let g:ale_keep_list_window_open = 0 let g:ale_lint_delay = 200 let g:ale_lint_on_enter = 1 let g:ale_lint_on_filetype_changed = 1 let g:ale_lint_on_insert_leave = 1 let g:ale_lint_on_save = 1 let g:ale_lint_on_text_changed = 'normal' let g:ale_linter_aliases = {} let g:ale_linters = {'go': ['gofmt', 'golint', 'go vet'], 'typescript': ['eslint', 'tsserver'], 'java': [], 'javascript': ['eslint'], 'python': ['pylint']} let g:ale_linters_explicit = 0 let g:ale_linters_ignore = {} let g:ale_list_vertical = 0 let g:ale_list_window_size = 10 let g:ale_loclist_msg_format = '[%code%] %s [%severity%]' let g:ale_lsp_root = {} let g:ale_max_buffer_history_size = 20 let g:ale_max_signs = -1 let g:ale_maximum_file_size = v:null let g:ale_open_list = 0 let g:ale_pattern_options = v:null let g:ale_pattern_options_enabled = v:null let g:ale_set_balloons = 0 let g:ale_set_highlights = 1 let g:ale_set_loclist = 1 let g:ale_set_quickfix = 0 let g:ale_set_signs = 1 let g:ale_sign_column_always = 0 let g:ale_sign_error = '>>' let g:ale_sign_info = '--' let g:ale_sign_offset = 1000000 let g:ale_sign_style_error = '>>' let g:ale_sign_style_warning = '--' let g:ale_sign_warning = '--' let g:ale_sign_highlight_linenrs = 0 let g:ale_statusline_format = v:null let g:ale_type_map = {} let g:ale_use_global_executables = v:null let g:ale_virtualtext_cursor = 0 let g:ale_warn_about_trailing_blank_lines = 1 let g:ale_warn_about_trailing_whitespace = 1 Command History:
(executable check - success) gofmt (finished - exit code 0) ['/usr/local/bin/zsh', '-c', '''gofmt'' -e ''/var/folders/d0/xcd__6ws5078rfkpggyg82680000gn/T/nvimtWMOnc/1/main.go''']
<<>>
(executable check - success) golint (finished - exit code 0) ['/usr/local/bin/zsh', '-c', '''golint'' ''/var/folders/d0/xcd__6ws5078rfkpggyg82680000gn/T/nvimtWMOnc/2/main.go''']
<<>>
(executable check - success) go (finished - exit code 0) ['/usr/local/bin/zsh', '-c', 'cd ''/Users/liyong/go/src/github.com/hungrybirder/hello/cmd'' && go vet .']
<<>>