mgechev / revive

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

Fix a performance regression #995 #998

Closed dominiquelefevre closed 2 weeks ago

dominiquelefevre commented 1 month ago

Closes #995

ldez commented 1 month ago

I think you should add a better PR title.

I still need a way to fully bypass the Go detection and set a Go version.

dominiquelefevre commented 1 month ago

Commit titles and messages contain enough information. If you have a specific PR title in mind, feel free to propose it.

Go version chooses the correct set of warnings to enable, so the version detection is a must.

ldez commented 1 month ago

Commit titles and messages contain enough information. If you have a specific PR title in mind, feel free to propose it.

I suggest: "fix: performance regression" And add "Fix #995" inside the PR description.

Go version chooses the correct set of warnings to enable, so the version detection is a must.

The Go detection is done inside golangci-lint, golangci-lint doesn't work as revive, so a way to set the Go version is a requirement for us.

dominiquelefevre commented 1 month ago

The Go detection is done inside golangci-lint, golangci-lint doesn't work as revive, so a way to set the Go version is a requirement for us.

I am not familiar with the way golangci-lint integrates revive and how you intend to use it. Please send patches to add hooks that you need.

ldez commented 1 month ago

I am not familiar with the way golangci-lint integrates revive and how you intend to use it.

We need to specify the Go version through this function:

func (l *Linter) Lint(packages [][]string, ruleSet []Rule, config Config) (<-chan Failure, error) {
dominiquelefevre commented 1 month ago

Added an option to override the language version detection to struct Config. @ldez, it should fit your description.

dominiquelefevre commented 1 month ago

Ping @denisvmedia, @chavacava, @ldez.

dominiquelefevre commented 2 weeks ago

Hey, is this repo alive? Can somebody review the PR? @denisvmedia , @chavacava , @ldez ?

chavacava commented 2 weeks ago

Hi @dominiquelefevre, thanks for the PR. I'm abroad with restricted internet and PC access. I'll check the PR as soon as I'm back home (next weekend)