-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[init refactor] introducing init analyzers #3533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[init refactor] introducing init analyzers #3533
Conversation
Codecov Report
|
98a28f7
to
15e12ca
Compare
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.
Looks good to me with a few nits
pkg/skaffold/initializer/analyze.go
Outdated
) | ||
|
||
type analysis struct { | ||
kubectlAnalyzer *KubectlAnalyzer |
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.
Do these three types need to be exposed?
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.
Actually, they don't!
15e12ca
to
7af6f16
Compare
Thanks for the quick review! I'll fix the nits tomorrow morning!:) |
Refactoring - shouldn't change anything functionally.
Introducing analyzers in the
initializer
package.An Analyzer is basically implementing a Visitor pattern, can react to EnterDir and ExitDir events and can be called on each file. This creates a more composable design that is open for extension but closed for modification.
Also added tests to cover config generation logic.