Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go vet error sign not shown #3214

Closed
ray-x opened this issue Jun 18, 2020 · 3 comments
Closed

Go vet error sign not shown #3214

ray-x opened this issue Jun 18, 2020 · 3 comments
Labels

Comments

@ray-x
Copy link

ray-x commented Jun 18, 2020

Information

VIM version

NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5

Operating System:
MacOS 10.15

What went wrong

Did not show the go vet error/diagnostic report (go lint report was shown regard missing comments )

Reproducing the bug

  1. A very simple go program
package main
  
  import (
          "fmt"
  )
  
type A struct {    // should be some warning here
          a int
          b string
  }
  
  func main() {
          arr := make([]a, 5)    // error here and below
          for i = range arr {     
                  arr[i] = A{}
                  arr[i] = A{a: 4}
                  arr[i] = A{a: 4, b: "bbb"}
                  fmt.Println(i)
          }
  }  
  1. Then this happened.
    Here should be an error sign
  arr := make([]a, 5)    // error here and below
  1. A minium vimrc
syntax on

" debug mode
set verbose=1
set verbosefile=/tmp/vimoutput.txt

" Make backspace behave in a sane manner.	
set backspace=indent,eol,start

set encoding=utf-8
if has('nvim')
  let s:config_home = stdpath('config')
else
  let s:config_home = '~/.config/nvim'
endif


call plug#begin('~/.vim/plugged')


Plug 'w0rp/ale'
call plug#end()

filetype plugin indent on
syntax on
set hidden

4 vim log. (vimoutput.log)

not found in 'runtimepath': "ftdetect/*.vim"
not found in 'packpath': "pack/*/start/*"
not found in 'packpath': "pack/*/start/matchit"
not found in 'packpath': "pack/*/start/*"
not found in 'runtimepath': "plugin/**/*.vim"
Reading ShaDa file "/Users/ray.xu/.local/share/nvim/shada/main.shada" info marks oldfiles
"main.go" 36L, 831C
Reading ShaDa file "/Users/ray.xu/.local/share/nvim/shada/main.shada" marks
SignColumn     xxx ctermfg=14 ctermbg=242 guifg=Cyan guibg=Grey
--- Signs ---

--- Signs ---

--- Signs ---
Signs for main.go:
    line=23  id=1000001  group=ale  name=ALEWarningSign  priority=30


"main.go" 
"main.go" 36L, 831C written
"main.go" 36L, 831C written
--- Signs ---
Signs for main.go:
    line=23  id=1000001  group=ale  name=ALEWarningSign  priority=30

--- Signs ---
Signs for main.go:
    line=23  id=1000001  group=ale  name=ALEWarningSign  priority=30

--- Signs ---
Signs for main.go:
    line=23  id=1000001  group=ale  name=ALEWarningSign  priority=30


Writing ShaDa file "/Users/ray.xu/.local/share/nvim/shada/main.shada"

:ALEInfo

It seems that go vet found the error but ALE failed to show it

vet: ./main.go:29:16: undeclared name: a

Full logs:



 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']
 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_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
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 = {}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
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) ['/bin/zsh', '-c', '''gofmt'' -e ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/1/main.go''']

<<<NO OUTPUT RETURNED>>>

(executable check - success) golint
(finished - exit code 0) ['/bin/zsh', '-c', '''golint'' ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/2/main.go''']

<<<OUTPUT STARTS>>>
/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/2/main.go:23:6: exported type A should have comment or be unexported
<<<OUTPUT ENDS>>>

(executable check - success) go
(finished - exit code 2) ['/bin/zsh', '-c', 'cd ''/Users/ray.xu/go/src/bitbucket.org/ray-x/pipelines-examples-go'' &&  go vet  .']

<<<OUTPUT STARTS>>>
# bitbucket.org/ray-x/pipelines-examples-go
vet: ./main.go:29:16: undeclared name: a
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''gofmt'' -e ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/4/main.go''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''golint'' ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/5/main.go''']

<<<OUTPUT STARTS>>>
/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/5/main.go:23:6: exported type A should have comment or be unexported
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''gofmt'' -e ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/6/main.go''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''golint'' ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/7/main.go''']

<<<OUTPUT STARTS>>>
/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/7/main.go:23:6: exported type A should have comment or be unexported
<<<OUTPUT ENDS>>>

(finished - exit code 2) ['/bin/zsh', '-c', 'cd ''/Users/ray.xu/go/src/bitbucket.org/ray-x/pipelines-examples-go'' &&  go vet  .']

<<<OUTPUT STARTS>>>
# bitbucket.org/ray-x/pipelines-examples-go
vet: ./main.go:29:16: undeclared name: a
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''gofmt'' -e ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/8/main.go''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''golint'' ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/9/main.go''']

<<<OUTPUT STARTS>>>
/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/9/main.go:23:6: exported type A should have comment or be unexported
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''gofmt'' -e ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/10/main.go''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 0) ['/bin/zsh', '-c', '''golint'' ''/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/11/main.go''']

<<<OUTPUT STARTS>>>
/var/folders/j_/q1hrp3lj619d06gp1_z7jcjr0000gp/T/nvim0vEBFd/11/main.go:23:6: exported type A should have comment or be unexported
<<<OUTPUT ENDS>>>

(finished - exit code 2) ['/bin/zsh', '-c', 'cd ''/Users/ray.xu/go/src/bitbucket.org/ray-x/pipelines-examples-go'' &&  go vet  .']

<<<OUTPUT STARTS>>>
# bitbucket.org/ray-x/pipelines-examples-go
vet: ./main.go:29:16: undeclared name: a
<<<OUTPUT ENDS>>>


@ray-x ray-x added the bug label Jun 18, 2020
@mostfunkyduck
Copy link
Contributor

I think #3191 covers this, could I get some feedback on that? I'm running a fork locally which I'd rather not do.

@ray-x
Copy link
Author

ray-x commented Jun 20, 2020

@mostfunkyduck
I did a quick check with your branch. The issue was fixed in your branch. Thanks!

@hsanson
Copy link
Contributor

hsanson commented Aug 3, 2021

Reported fixed year ago with #3191.

@hsanson hsanson closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants