MCPcopy Create free account
hub / github.com/devspace-sh/devspace / validateCommands

Function validateCommands

pkg/devspace/config/versions/validate.go:186–197  ·  view source on GitHub ↗
(config *latest.Config)

Source from the content-addressed store, hash-verified

184}
185
186func validateCommands(config *latest.Config) error {
187 for key, command := range config.Commands {
188 if encoding.IsUnsafeCommandName(command.Name) {
189 return fmt.Errorf("commands.%s has to match the following regex: %v", command.Name, encoding.UnsafeNameRegEx.String())
190 }
191 if command.Command == "" {
192 return errors.Errorf("commands.%s.command is required", key)
193 }
194 }
195
196 return nil
197}
198
199func validateHooks(config *latest.Config) error {
200 for index, hookConfig := range config.Hooks {

Callers 1

ValidateFunction · 0.85

Calls 3

IsUnsafeCommandNameFunction · 0.92
ErrorfMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected