From b495edfc63591ae2121afbad74927989751f4c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Thu, 5 Dec 2024 14:27:52 +0100 Subject: [PATCH 1/2] test commit to check linter rule --- internal/controller/runtime/fsm/runtime_fsm_common.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/controller/runtime/fsm/runtime_fsm_common.go b/internal/controller/runtime/fsm/runtime_fsm_common.go index 33e7b781..2d5b9bbd 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_common.go +++ b/internal/controller/runtime/fsm/runtime_fsm_common.go @@ -12,8 +12,9 @@ func updateStatusAndRequeue() (stateFn, *ctrl.Result, error) { } func updateStatusAndRequeueAfter( - //nolint:unparam +//nolint:unparam duration time.Duration) (stateFn, *ctrl.Result, error) { + var notused = 0 return sFnUpdateStatus(&ctrl.Result{RequeueAfter: duration}, nil), nil, nil } From e2d5e24dd98165d62edfd1ddbb8b88f3779120b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Thu, 5 Dec 2024 14:31:14 +0100 Subject: [PATCH 2/2] adds unused function to feed linter --- internal/controller/runtime/fsm/runtime_fsm_common.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/controller/runtime/fsm/runtime_fsm_common.go b/internal/controller/runtime/fsm/runtime_fsm_common.go index 2d5b9bbd..b9737a54 100644 --- a/internal/controller/runtime/fsm/runtime_fsm_common.go +++ b/internal/controller/runtime/fsm/runtime_fsm_common.go @@ -12,12 +12,15 @@ func updateStatusAndRequeue() (stateFn, *ctrl.Result, error) { } func updateStatusAndRequeueAfter( -//nolint:unparam + //nolint:unparam duration time.Duration) (stateFn, *ctrl.Result, error) { - var notused = 0 return sFnUpdateStatus(&ctrl.Result{RequeueAfter: duration}, nil), nil, nil } +func notUsed() { + // This function is not used in the codebase. +} + func updateStatusAndStop() (stateFn, *ctrl.Result, error) { return sFnUpdateStatus(nil, nil), nil, nil }