diff --git a/internal/summary/summary.go b/internal/summary/summary.go index 5f3c819b..bea15c3f 100644 --- a/internal/summary/summary.go +++ b/internal/summary/summary.go @@ -247,7 +247,6 @@ func printTaskRequires(l *logger.Logger, t *ast.Task) { l.Outf(logger.Default, " vars:\n") for _, v := range t.Requires.Vars { - // If the variable has enum constraints, format accordingly if v.Enum != nil && len(v.Enum.Value) > 0 { l.Outf(logger.Yellow, " - %s:\n", v.Name) l.Outf(logger.Yellow, " enum:\n") @@ -255,7 +254,6 @@ func printTaskRequires(l *logger.Logger, t *ast.Task) { l.Outf(logger.Yellow, " - %s\n", enumValue) } } else { - // Simple required variable l.Outf(logger.Yellow, " - %s\n", v.Name) } } diff --git a/requires.go b/requires.go index 54c448a7..41e9e5a4 100644 --- a/requires.go +++ b/requires.go @@ -208,7 +208,6 @@ func (e *Executor) areTaskRequiredVarsAllowedValuesSet(t *ast.Task) error { return nil } -// getEnumValues returns the enum values from an Enum struct, or nil if the enum is nil. func getEnumValues(e *ast.Enum) []string { if e == nil { return nil diff --git a/taskfile/ast/requires.go b/taskfile/ast/requires.go index 10d6855a..94bc4026 100644 --- a/taskfile/ast/requires.go +++ b/taskfile/ast/requires.go @@ -25,8 +25,8 @@ func (r *Requires) DeepCopy() *Requires { // Enum represents an enum constraint for a required variable. // It can either be a static list of values or a reference to another variable. type Enum struct { - Ref string // Reference to a variable containing the allowed values - Value []string // Static list of allowed values + Ref string + Value []string } func (e *Enum) DeepCopy() *Enum {