-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Replace gometalinter with GolangCI-Lint #619
Conversation
@@ -91,8 +91,7 @@ func (a *LogAggregator) Start(ctx context.Context, client corev1.CoreV1Interface | |||
return nil | |||
} | |||
|
|||
// nolint: interfacer | |||
func (a *LogAggregator) streamLogs(ctx context.Context, client corev1.CoreV1Interface, pod *v1.Pod) error { | |||
func (a *LogAggregator) streamLogs(ctx context.Context, client corev1.PodsGetter, pod *v1.Pod) error { |
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.
Having this as a corev1interface instead of podsgetter was intentional, even though it failed linting.
Switching it gave me an error downstream. I don't think it would be covered by tests. I'll have to test it again.
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.
What do you mean downstream? e2e tests?
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.
Yep - i think the error I was thinking of was actually in wait.go
where I had the nolint: interfacer
. This LGTM
615e025
to
92f15d3
Compare
Running test.sh is down from 34s to 20s on my machine. Also, from now on, run go lint. Signed-off-by: David Gageot <david@gageot.net>
@@ -91,8 +91,7 @@ func (a *LogAggregator) Start(ctx context.Context, client corev1.CoreV1Interface | |||
return nil | |||
} | |||
|
|||
// nolint: interfacer | |||
func (a *LogAggregator) streamLogs(ctx context.Context, client corev1.CoreV1Interface, pod *v1.Pod) error { | |||
func (a *LogAggregator) streamLogs(ctx context.Context, client corev1.PodsGetter, pod *v1.Pod) error { |
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.
Yep - i think the error I was thinking of was actually in wait.go
where I had the nolint: interfacer
. This LGTM
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.
oops this needs a rebase on master, I think some linting errors went in
|
Signed-off-by: David Gageot <david@gageot.net>
@r2d4 I rebased and fixed the new errors. Let's merge! |
gometalinter is broken @ HEAD, and I looked into why that was. During that process, I remembered that we took the linting scripts from skaffold, and found that in skaffold gometalinter was replaced with GolangCI-Lint: GoogleContainerTools/skaffold#619 The change made linting in skaffold faster, so I figured instead of fixing gometalinter it made more sense to remove it and replace it with GolangCI-Lint for kaniko as well.
gometalinter is broken @ HEAD, and I looked into why that was. During that process, I remembered that we took the linting scripts from skaffold, and found that in skaffold gometalinter was replaced with GolangCI-Lint: GoogleContainerTools/skaffold#619 The change made linting in skaffold faster, so I figured instead of fixing gometalinter it made more sense to remove it and replace it with GolangCI-Lint for kaniko as well.
gometalinter is broken @ HEAD, and I looked into why that was. During that process, I remembered that we took the linting scripts from skaffold, and found that in skaffold gometalinter was replaced with GolangCI-Lint: GoogleContainerTools/skaffold#619 The change made linting in skaffold faster, so I figured instead of fixing gometalinter it made more sense to remove it and replace it with GolangCI-Lint for kaniko as well.
gometalinter is broken @ HEAD, and I looked into why that was. During that process, I remembered that we took the linting scripts from skaffold, and found that in skaffold gometalinter was replaced with GolangCI-Lint: GoogleContainerTools/skaffold#619 The change made linting in skaffold faster, so I figured instead of fixing gometalinter it made more sense to remove it and replace it with GolangCI-Lint for kaniko as well.
Running test.sh is down from 34s to 20s on my
machine.
Also, from now on, run go lint.
Signed-off-by: David Gageot david@gageot.net