(filePath, importPath, workflowFilePath, yamlContent string, resolveErr error)
| 156 | } |
| 157 | |
| 158 | func formatInitialImportResolveError(filePath, importPath, workflowFilePath, yamlContent string, resolveErr error) error { |
| 159 | if workflowFilePath != "" && yamlContent != "" { |
| 160 | line, column := findImportItemLocation(yamlContent, importPath) |
| 161 | importErr := &ImportError{ |
| 162 | ImportPath: importPath, |
| 163 | FilePath: workflowFilePath, |
| 164 | Line: line, |
| 165 | Column: column, |
| 166 | Cause: resolveErr, |
| 167 | } |
| 168 | return FormatImportError(importErr, yamlContent) |
| 169 | } |
| 170 | return fmt.Errorf("failed to resolve import '%s': %w", filePath, resolveErr) |
| 171 | } |
| 172 | |
| 173 | func validateNoLockYMLImport(fullPath, importPath, workflowFilePath, yamlContent string) error { |
| 174 | if !strings.HasSuffix(strings.ToLower(fullPath), ".lock.yml") { |
no test coverage detected