From c5510e45b7a68f9948e3a54ef6182ade38aff9be Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Mon, 14 Aug 2023 15:00:22 +0200 Subject: [PATCH 1/2] Add interfacebloat linter --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index c86dd0e423f8..ed3a2b84153b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -96,6 +96,7 @@ linters: - govet - importas - ineffassign + - interfacebloat - lll - makezero - misspell From 4c6c52e44dddde1389deb4520eb229679873ae6d Mon Sep 17 00:00:00 2001 From: codebien <2103732+codebien@users.noreply.github.com> Date: Mon, 14 Aug 2023 15:02:23 +0200 Subject: [PATCH 2/2] lib: nolint directives for interfacebloat --- lib/executors.go | 3 +++ lib/runner.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lib/executors.go b/lib/executors.go index ae50a907fe79..e2325b6b03fb 100644 --- a/lib/executors.go +++ b/lib/executors.go @@ -55,6 +55,9 @@ type ExecutionStep struct { // TODO: make []ExecutionStep or []ExecutorConfig their own type? // ExecutorConfig is an interface that should be implemented by all executor config types +// +// nolint: interfacebloat +// At the moment we don't plan to split it. If a need will be raised then we may re-evaluate it. type ExecutorConfig interface { Validate() []error diff --git a/lib/runner.go b/lib/runner.go index e202966692c8..f6f3d8a36d88 100644 --- a/lib/runner.go +++ b/lib/runner.go @@ -46,6 +46,10 @@ type VUActivationParams struct { // // TODO: Rename this to something more obvious? This name made sense a very long // time ago. +// +// nolint: interfacebloat +// We may evaluate in the future if we can move out some methods; +// but considering how central it is, it would require a huge effort. type Runner interface { // Creates an Archive of the runner. There should be a corresponding NewFromArchive() function // that will restore the runner from the archive.