MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / formatPath

Function formatPath

src/eval/harness.ts:112–124  ·  view source on GitHub ↗
(filePath: string | null, redactPaths: boolean)

Source from the content-addressed store, hash-verified

110}
111
112function formatPath(filePath: string | null, redactPaths: boolean): string {
113 if (!filePath) {
114 return 'none';
115 }
116
117 const normalized = filePath.replace(/\\/g, '/');
118 if (!redactPaths) {
119 return normalized;
120 }
121
122 const base = normalized.split('/').pop() || normalized;
123 return `path#${hashPath(normalized)}/${base}`;
124}
125
126export async function evaluateFixture({
127 fixture,

Callers 1

formatEvalReportFunction · 0.85

Calls 1

hashPathFunction · 0.85

Tested by

no test coverage detected