mgechev / revive

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

[dot-imports] support allow list of packages #939

Closed nunnatsa closed 7 months ago

nunnatsa commented 8 months ago

Add the ability to allow list of packages to be dot imported.

Add a new don-imports configuration:

Example:

[rule.dot-imports]
  arguments = [{ allowedPackages = ["github.com/onsi/ginkgo/v2","github.com/onsi/gomega"] }]

Fixes #923

nunnatsa commented 8 months ago

/cc @chavacava

chavacava commented 7 months ago

Hi @nunnatsa thanks for the PR! (and sorry for the late response)