refactor: remove redundant comments

This commit is contained in:
Valentin Maerten
2026-02-04 22:57:02 +01:00
parent ba3f6a0fc7
commit 0354bfdb57
3 changed files with 2 additions and 5 deletions

View File

@@ -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)
}
}

View File

@@ -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

View File

@@ -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 {