ValidateConfig checks the .taskmd.yaml config file for issues. Returns an empty result if config is nil.
(config *ConfigData)
| 360 | // ValidateConfig checks the .taskmd.yaml config file for issues. |
| 361 | // Returns an empty result if config is nil. |
| 362 | func (v *Validator) ValidateConfig(config *ConfigData) *ValidationResult { |
| 363 | result := &ValidationResult{ |
| 364 | Issues: make([]ValidationIssue, 0), |
| 365 | } |
| 366 | if config == nil { |
| 367 | return result |
| 368 | } |
| 369 | |
| 370 | v.checkConfigScopes(config, result) |
| 371 | v.checkUnknownConfigKeys(config, result) |
| 372 | v.checkWorkflowValue(config, result) |
| 373 | v.checkIDConfig(config, result) |
| 374 | v.checkPhaseConfig(config, result) |
| 375 | |
| 376 | return result |
| 377 | } |
| 378 | |
| 379 | // validIDStrategies lists the allowed values for the id.strategy field. |
| 380 | var validIDStrategies = map[string]bool{ |