(config *latest.Config)
| 184 | } |
| 185 | |
| 186 | func 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 | |
| 199 | func validateHooks(config *latest.Config) error { |
| 200 | for index, hookConfig := range config.Hooks { |
no test coverage detected