MCPcopy Index your code
hub / github.com/coder/coder / shortPath

Function shortPath

site/scripts/check-compiler.mjs:253–261  ·  view source on GitHub ↗
(file, dirs = targetDirs)

Source from the content-addressed store, hash-verified

251 * dir prefix so the output stays compact.
252 */
253export function shortPath(file, dirs = targetDirs) {
254 for (const dir of dirs) {
255 const prefix = `${dir}/`;
256 if (file.startsWith(prefix)) {
257 return file.slice(prefix.length);
258 }
259 }
260 return file;
261}
262
263/** Print a summary of compilation results and per-file diagnostics. */
264function printReport(failures, totalCompiled, fileCount, hadErrors) {

Callers 3

printReportFunction · 0.85
check-compiler.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected