You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.
When I run gometalinter inside a project directory, the file names in its output are relative to my $GOPATH/src/ instead of to the current directory:
; echo $GOPATH
/home/alcortes/room/workspaces/go
; pwd
/home/alcortes/room/workspaces/go/src/alcortes/summerfield/ch4/ex4.4.1
; ls
guess_separator.go guess_separator_internal_test.go README.md SCRIPTS test_00_tabs.txt
; gometalinter
alcortes/summerfield/ch4/ex4.4.1/guess_separator.go:33:13:warning: error return value not checked (file.Close()) (errcheck)
alcortes/summerfield/ch4/ex4.4.1/guess_separator_internal_test.go:22:18:warning: error return value not checked (buf.WriteString(lines[i] + "\n")) (errcheck)
alcortes/summerfield/ch4/ex4.4.1/guess_separator_internal_test.go:143:10:warning: error return value not checked (m.Seek(0, 0)) (errcheck)
Shouldn't it be something like this instead?
; gometalinter
guess_separator.go:33:13:warning: error return value not checked (file.Close()) (errcheck)
guess_separator_internal_test.go:22:18:warning: error return value not checked (buf.WriteString(lines[i] + "\n")) (errcheck)
guess_separator_internal_test.go:143:10:warning: error return value not checked (m.Seek(0, 0)) (errcheck)
The text was updated successfully, but these errors were encountered:
I think it's just errcheck output that's borked, for example, run gometalinter on a sub-package, it prepends the path it was called to with the package name output from errcheck, but other linters do the right thing:
gometalinter subpackage
subpackage/file.go:5:1:warning: comment on exported method Subpackage.Function should be of the form "Function ..." (golint)
subpackage/my/project/subpackage/file.go:6:10:warning: error return value not checked (some.Func()) (errcheck)
When I run gometalinter inside a project directory, the file names in its output are relative to my $GOPATH/src/ instead of to the current directory:
Shouldn't it be something like this instead?
The text was updated successfully, but these errors were encountered: