revive icon indicating copy to clipboard operation
revive copied to clipboard

Consider replacing hashicorp go-version by std one

Open ccoVeille opened this issue 8 months ago • 4 comments

Is there a reason to use hashicorp go-version in the code

https://github.com/mgechev/revive/blob/535ec5a470ce5313ddd321d27d0a4e52ef46695d/lint/package.go#L11

When there is an std one?

https://pkg.go.dev/go/version

It's also strange to see we are importing the std one in revive tests.

https://github.com/mgechev/revive/blob/535ec5a470ce5313ddd321d27d0a4e52ef46695d/cli/main_test.go#L4

ccoVeille avatar Apr 08 '25 18:04 ccoVeille

Thanks for pointing this out! github.com/hashicorp/go-version was added in #993 by @dominiquelefevre.

To me, it makes sense to refactor to go/version and use it consistently throughout the codebase. I'm happy to take care of that or review a PR if someone else wants to tackle it.

alexandear avatar Apr 09 '25 10:04 alexandear

I don't plan to work on this. I'm too busy.

So feel free to take it

ccoVeille avatar Apr 09 '25 11:04 ccoVeille

@alexandear, are you planning/working this issue? If not, I can try to do the refactor and open a PR in near future.

vbvictor avatar Apr 12 '25 11:04 vbvictor

@vbvictor Not really. I assigned the issue to you, feel free to open a PR.

alexandear avatar Apr 13 '25 09:04 alexandear