From 9cfe704a6db5b9f221576803fec368bed096e2c4 Mon Sep 17 00:00:00 2001 From: druppelt <44848632+druppelt@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:39:02 +0200 Subject: [PATCH] add explanation to nolint --- internal/calc/deployment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/calc/deployment.go b/internal/calc/deployment.go index 5c0a1cf..0943370 100644 --- a/internal/calc/deployment.go +++ b/internal/calc/deployment.go @@ -88,7 +88,7 @@ func deployment(deployment appsv1.Deployment) (*ResourceUsage, error) { if podOverheadInt > math.MaxInt32 || podOverheadInt < math.MinInt32 { return nil, fmt.Errorf("deployment: %s maxSurge - maxUnavailable (%d-%d) was out of bounds for int32", deployment.Name, maxSurge, maxUnavailable) } - podOverhead = int32(podOverheadInt) //nolint:gosec,wsl + podOverhead = int32(podOverheadInt) //nolint:gosec,wsl // gosec doesn't understand that the int conversion is already guarded, wsl wants to group the assignment with the next block resourceOverhead = (float64(podOverhead) / float64(*replicas)) + 1 default: