From b7d73dbc787786fc32c267a1f8cfe79cf830f02e Mon Sep 17 00:00:00 2001 From: Gautam Kumar Date: Wed, 17 Jun 2026 08:28:53 +0530 Subject: [PATCH] fix: Change default highestUserWastedPercent to disabled When highestUserWastedPercent is commented out in the .dive-ci config, the rule was not being skipped but instead used the default value of 0.1. This was inconsistent with highestWastedBytes which defaults to 'disabled' and is properly skipped when commented out. Changed the default value from '0.1' to 'disabled' to make the behavior consistent. Users who want this rule active must now explicitly set it in their config file. Closes #606 Signed-off-by: Gautam Kumar --- cmd/dive/cli/internal/options/ci_rules.go | 2 +- .../cli/testdata/image-multi-layer-dockerfile/dive-fail.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/dive/cli/internal/options/ci_rules.go b/cmd/dive/cli/internal/options/ci_rules.go index 710c9b8a..4d5fb7fa 100644 --- a/cmd/dive/cli/internal/options/ci_rules.go +++ b/cmd/dive/cli/internal/options/ci_rules.go @@ -23,7 +23,7 @@ func DefaultCIRules() CIRules { return CIRules{ LowestEfficiencyThresholdString: "0.9", HighestWastedBytesString: "disabled", - HighestUserWastedPercentString: "0.1", + HighestUserWastedPercentString: "disabled", } } diff --git a/cmd/dive/cli/testdata/image-multi-layer-dockerfile/dive-fail.yaml b/cmd/dive/cli/testdata/image-multi-layer-dockerfile/dive-fail.yaml index 23778588..d7ff649a 100644 --- a/cmd/dive/cli/testdata/image-multi-layer-dockerfile/dive-fail.yaml +++ b/cmd/dive/cli/testdata/image-multi-layer-dockerfile/dive-fail.yaml @@ -1,3 +1,4 @@ ci: true rules: lowest-efficiency-threshold: '0.9' + highest-user-wasted-percent: '0.1'