AddIssue adds a validation issue and updates counters
(level ValidationLevel, taskID, filePath, message string)
| 43 | |
| 44 | // AddIssue adds a validation issue and updates counters |
| 45 | func (vr *ValidationResult) AddIssue(level ValidationLevel, taskID, filePath, message string) { |
| 46 | vr.Issues = append(vr.Issues, ValidationIssue{ |
| 47 | Level: level, |
| 48 | TaskID: taskID, |
| 49 | FilePath: filePath, |
| 50 | Message: message, |
| 51 | }) |
| 52 | |
| 53 | if level == LevelError { |
| 54 | vr.Errors++ |
| 55 | } else if level == LevelWarning { |
| 56 | vr.Warnings++ |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // ConfigData holds parsed config file data for validation. |
| 61 | // Extracted in the CLI layer so the validator stays viper-free. |
no outgoing calls
no test coverage detected