gojp / goreportcard

A report card for your Go application
https://goreportcard.com
Apache License 2.0
1.99k stars 252 forks source link

Golint is deprecated #378

Open antichris opened 2 years ago

antichris commented 2 years ago

NOTE: Golint is deprecated and frozen. There's no drop-in replacement for it, but tools such as Staticcheck and go vet should be used instead. — https://github.com/golang/lint#readme

This was already brought up in #318 and #349, but both issues were closed by the bot without anyone actually addressing it in any meaningful way (which is probably yet another issue: when nobody gives a shit about an issue for more than 60 days, it just magically "poof"s closed).

CC: @dvrkps, @andrew-field, @gucio321 and @hrmnjt would probably be interested in in the progress of this issue.

antichris commented 2 years ago

Also CC: @cristaloleg, @TheDiveO, @BrenekH, @Denchick, @georgettica, @obalunenko, @antoineco, @benjaminbartels, @slyang-git, and @patrickhoefler, who thumbs-up'ed both previous issues and, I suspect, would appreciate this issue being finally addressed for real.

cristaloleg commented 2 years ago

Yes, golint is frozen but not deprecated, it still works and suggests what is better to fix. However, after Go 1.18 release golint (probably?) will not work with generics because it knows nothing about them.

AFAIR https://github.com/mgechev/revive is a drop-in replacement for golint and probably that's the tool that we should use.

antichris commented 2 years ago

Yes, golint is frozen but not deprecated, it still works and suggests what is better to fix

If by "not deprecated" you mean "it can still be downloaded, installed and kind of more or less works", I would hesitantly agree.

But the fact is that the repo is archived, the package is officially unmaintained and frozen, and the tens of outstanding issues it had were all closed unresolved when the Go team agreed on and enacted the decision to, literally, deprecate (https://github.com/golang/go/issues/38968#issuecomment-638331245) it. The tool is now abandoned and the recommendation stands against using it. Precisely as I understand "deprecated".

Revive is good, though. :+1:

peczenyj commented 2 years ago

Hello

the latest version of golangci-lint (v1.45.0) add some support to go1.18 via one flag that disable most of the problematic linters that does not work properly with generics.

I try to use goreportcard with one project using generics and the result was a big mess. Perhaps it is time to move forward?

https://github.com/golangci/golangci-lint/releases/tag/v1.45.0

antichris commented 2 years ago

@shawnps

(...) the golint check has been removed. — https://github.com/gojp/goreportcard/issues/381#issuecomment-1074672143

Is that the final resolution for this issue or are there other plans (e.g. revive, as https://github.com/gojp/goreportcard/issues/378#issuecomment-1039031222 suggested, or something else)?

thediveo commented 2 years ago

As revive stresses that out of the box it acts as a faster drop-in replacement for golint, please drop it finally into goreportcard! From reading and rereading this issue and revive's documentation that shouldn't be rocket science and get this issue quickly and reliably plugged?!

gucio321 commented 2 years ago

it seems that gometalinter needs to be replaced with golangci-lint in order to cpmolete this.

@shawnps @hermanschaaf any updates here???