MCPcopy Index your code
hub / github.com/codeaashu/claude-code / formatLocation

Function formatLocation

src/tools/LSPTool/formatters.ts:99–104  ·  view source on GitHub ↗

* Formats a Location with file path and line/character position

(location: Location, cwd?: string)

Source from the content-addressed store, hash-verified

97 * Formats a Location with file path and line/character position
98 */
99function formatLocation(location: Location, cwd?: string): string {
100 const filePath = formatUri(location.uri, cwd)
101 const line = location.range.start.line + 1 // Convert to 1-based
102 const character = location.range.start.character + 1 // Convert to 1-based
103 return `${filePath}:${line}:${character}`
104}
105
106/**
107 * Converts LocationLink to Location format for consistent handling

Callers 2

Calls 1

formatUriFunction · 0.70

Tested by

no test coverage detected