Skip to content

Commit

Permalink
add explanation to nolint
Browse files Browse the repository at this point in the history
  • Loading branch information
druppelt committed Sep 11, 2024
1 parent 6aeb746 commit 9cfe704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/calc/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9cfe704

Please sign in to comment.