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

Function formatNestedResolveError

pkg/parser/import_bfs.go:448–455  ·  view source on GitHub ↗
(nestedImportPath, nestedFilePath string, item importQueueItem, workflowFilePath string, yamlContent string, resolveErr error)

Source from the content-addressed store, hash-verified

446}
447
448func formatNestedResolveError(nestedImportPath, nestedFilePath string, item importQueueItem, workflowFilePath string, yamlContent string, resolveErr error) error {
449 if workflowFilePath != "" && yamlContent != "" {
450 line, column := findImportItemLocation(yamlContent, item.importPath)
451 importErr := &ImportError{ImportPath: nestedImportPath, FilePath: workflowFilePath, Line: line, Column: column, Cause: resolveErr}
452 return FormatImportError(importErr, yamlContent)
453 }
454 return fmt.Errorf("failed to resolve nested import '%s' from '%s': %w", nestedFilePath, item.fullPath, resolveErr)
455}
456
457func canonicalizeNestedImportPath(nestedImportPath, nestedBaseDir, baseDir string, nestedRemoteOrigin *remoteImportOrigin, nestedFullPath string) string {
458 if nestedRemoteOrigin != nil || nestedBaseDir == baseDir {

Callers 1

enqueueNestedImportEntryFunction · 0.85

Calls 3

findImportItemLocationFunction · 0.85
FormatImportErrorFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected