(config *latest.Config)
| 168 | } |
| 169 | |
| 170 | func 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 | |
| 186 | func validateCommands(config *latest.Config) error { |
| 187 | for key, command := range config.Commands { |
no test coverage detected