mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.74k stars 276 forks source link

rule for redundant import aliases #853

Closed damif94 closed 1 year ago

damif94 commented 1 year ago

Is your feature request related to a problem? Please describe. In Goland IDE, I got errors for redundant import aliases, i.e., when the imported package name matches the alias names. My coworkes at draftea using VSCode don't get this errors, so it would be nice to make this compliant at the precommit/CI stage.

Describe the solution you'd like A new rule redundant-import-alias that would warn upon this condition.

Additional context The idea is to get this warning internalized into revive.

Screen Shot 2023-07-29 at 17 40 02
damif94 commented 1 year ago

@chavacava now that the PR is merged, we need a new release right?

chavacava commented 1 year ago

The approach in revive is to use the master branch as the "latest version" of the tool. Anyway, if for some reason a release is needed (for example if you are using revive through golangci-lint) @mgechev triggers a release every ~4 months (or when critical bugs are fixed)

damif94 commented 1 year ago

I think a release would be convenient so we can use it with github actions https://github.com/morphy2k/revive-action/blob/master/Dockerfile#L4

chavacava commented 1 year ago

closed by #854