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

Function validateDependencies

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

Source from the content-addressed store, hash-verified

168}
169
170func validateDependencies(config *latest.Config) error {
171 for name, dep := range config.Dependencies {
172 if encoding.IsUnsafeName(name) {
173 return fmt.Errorf("dependencies.%s has to match the following regex: %v", name, encoding.UnsafeNameRegEx.String())
174 }
175 if dep.Source == nil {
176 return errors.Errorf("dependencies.%s.source is required", name)
177 }
178 if dep.Source.Git == "" && dep.Source.Path == "" {
179 return errors.Errorf("dependencies.%s.git or dependencies[%s].path is required", name, name)
180 }
181 }
182
183 return nil
184}
185
186func validateCommands(config *latest.Config) error {
187 for key, command := range config.Commands {

Callers 1

ValidateFunction · 0.85

Calls 3

IsUnsafeNameFunction · 0.92
ErrorfMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected