MCPcopy Create free account
hub / github.com/github/gh-aw / formatInitialImportResolveError

Function formatInitialImportResolveError

pkg/parser/import_bfs.go:158–171  ·  view source on GitHub ↗
(filePath, importPath, workflowFilePath, yamlContent string, resolveErr error)

Source from the content-addressed store, hash-verified

156}
157
158func 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
173func validateNoLockYMLImport(fullPath, importPath, workflowFilePath, yamlContent string) error {
174 if !strings.HasSuffix(strings.ToLower(fullPath), ".lock.yml") {

Callers 1

resolveSeedImportPathFunction · 0.85

Calls 3

findImportItemLocationFunction · 0.85
FormatImportErrorFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected