-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[dot-imports] support allow list of packages #939
Conversation
/cc @chavacava |
21dc081
to
09b6755
Compare
package pkg | ||
|
||
import ( | ||
. "context" // in allowedPackages (standard library => just the name without full path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please have a non-aliased and aliased imports to make sure they are not affected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @denisvmedia. Fixed. PTAL.
Add the ability to allow list of packages to be dot imported. Add a new don-imports configuration: * `allowedPackages`: (string) comma-separated list of allowed dot import packages Example: ```toml [rule.dot-imports] arguments = [{ allowedPackages = "github.com/onsi/ginkgo/v2,github.com/onsi/gomega" }] ```
Hi @nunnatsa thanks for the PR! (and sorry for the late response) |
Add the ability to allow list of packages to be dot imported.
Add a new don-imports configuration:
allowedPackages
: (list of strings) comma-separated list of allowed dot import packagesExample:
Fixes #923