Skip to content

Commit 0c71a42

Browse files
committed
featuregates_linter: take versioned into account in the error message
1 parent e9c9a27 commit 0c71a42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/featuregates_linter/cmd/feature_gates.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ func verifyOrUpdateFeatureList(rootPath, featureListFile string, update, version
167167
}
168168

169169
if diff := cmp.Diff(featureList, baseFeatureList); diff != "" {
170-
return fmt.Errorf("detected diff in unversioned feature list, diff: \n%s", diff)
170+
if versioned {
171+
return fmt.Errorf("detected diff in versioned feature list (%s), diff: \n%s", versionedFeatureListFile, diff)
172+
} else {
173+
return fmt.Errorf("detected diff in unversioned feature list (%s), diff: \n%s", unversionedFeatureListFile, diff)
174+
}
171175
}
172176
return nil
173177
}

0 commit comments

Comments
 (0)