fix: Comment out ipSloppyValidator

It is currently not supported.
This commit is contained in:
yongruilin
2025-10-01 21:38:57 +00:00
parent 51f02aa58a
commit 2fd76c8ed1

View File

@@ -49,7 +49,9 @@ func (formatTagValidator) ValidScopes() sets.Set[Scope] {
var (
// Keep this list alphabetized.
ipSloppyValidator = types.Name{Package: libValidationPkg, Name: "IPSloppy"}
// TODO: uncomment the following when we've done the homework
// to be sure it works the current state of IP manual-ratcheting
// ipSloppyValidator = types.Name{Package: libValidationPkg, Name: "IPSloppy"}
labelKeyValidator = types.Name{Package: libValidationPkg, Name: "LabelKey"}
labelValueValidator = types.Name{Package: libValidationPkg, Name: "LabelValue"}
longNameCaselessValidator = types.Name{Package: libValidationPkg, Name: "LongNameCaseless"}
@@ -83,8 +85,12 @@ func getFormatValidationFunction(format string) (FunctionGen, error) {
switch format {
// Keep this sequence alphabetized.
case "k8s-ip":
return Function(formatTagName, DefaultFlags, ipSloppyValidator), nil
// TODO: uncomment the following when we've done the homework
// to be sure it works the current state of IP manual-ratcheting
/*
case "k8s-ip":
return Function(formatTagName, DefaultFlags, ipSloppyValidator), nil
*/
case "k8s-label-key":
return Function(formatTagName, DefaultFlags, labelKeyValidator), nil
case "k8s-label-value":