superfly / flyctl

Printf with dynamic first argument and no further arguments SCC-SA1006
Bug risk
Major
2 months ago4 years old
printf-style function with dynamic format string and no further arguments should use print-style function instead
133
134	// TODO: Blend extraInfo into ValidationError and remove this hack
135	if err, extraInfo := appConfig.ValidateGroups(ctx, lo.Keys(args.ProcessGroups)); err != nil {
136		fmt.Fprintf(iostreams.FromContext(ctx).ErrOut, extraInfo)137		tracing.RecordError(span, err, "failed to validate process groups")
138		return nil, err
139	}
printf-style function with dynamic format string and no further arguments should use print-style function instead
 32	}
 33
 34	if customPrompt != "" {
 35		fmt.Fprintf(io.Out, customPrompt) 36	} else {
 37		fmt.Fprintf(io.Out, "Configuration changes to be applied to machine: %s (%s)\n", colorize.Bold(machine.ID), colorize.Bold(machine.Name))
 38	}