[pkg-go] Bug#991084: golint: Golint doesn't return error code if it find any errors

Shengjing Zhu zhsj at debian.org
Tue Jul 13 20:21:33 BST 2021


On Wed, Jul 14, 2021 at 3:03 AM Dmitry E. Oboukhov <unera at debian.org> wrote:
>
> Package: golint
> Version: 0.0+git20200130.910be7a-1+b5
> Severity: normal
> X-Debbugs-Cc: unera at debian.org
>
> Package: golint
> X-Debbugs-Cc: unera at debian.org
> Version: 0.0+git20200130.910be7a-1+b5
> Severity: normal
>
> So it's unusable with CI/Vim
>
> Example:
>
> $ golint cal.go
> cal.go:12:8: expected '(', found ain (and 2 more errors)
>
> $ golint cal.go && echo ok
> cal.go:12:8: expected '(', found ain (and 2 more errors)
> ok
>
> $ golint --help
> Usage of golint:
>         golint [flags] # runs on package in current directory
>         golint [flags] [packages]
>         golint [flags] [directories] # where a '/...' suffix includes all sub-directories
>         golint [flags] [files] # all must belong to a single package
> Flags:
>   -min_confidence float
>         minimum confidence of a problem to print it (default 0.8)
>   -set_exit_status
>         set exit status to 1 if any issues are found
>
> $ golint -set_exit_status cal.go && echo ok
> cal.go:12:8: expected '(', found ain (and 2 more errors)
> ok

It's an upstream issue, but unfortunately golint is no longer maintained.
https://github.com/golang/go/issues/38968


--
Shengjing Zhu



More information about the Pkg-go-maintainers mailing list