MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / runCommand

Function runCommand

src/tools/static-analysis.ts:31–38  ·  view source on GitHub ↗
(cmd: string, args: string[], cwd: string)

Source from the content-addressed store, hash-verified

29};
30
31async function runCommand(cmd: string, args: string[], cwd: string): Promise<LintResult> {
32 try {
33 const { stdout, stderr } = await execFileAsync(cmd, args, { cwd, timeout: 30000, maxBuffer: 1024 * 512 });
34 return { tool: cmd, output: (stdout + stderr).trim(), exitCode: 0 };
35 } catch (err: any) {
36 return { tool: cmd, output: (err.stdout ?? "") + (err.stderr ?? ""), exitCode: err.code ?? 1 };
37 }
38}
39
40async function detectAvailableLinter(rootDir: string, ext: string): Promise<{ cmd: string; args: string[] } | null> {
41 const config = LINTER_MAP[ext];

Callers 1

runStaticAnalysisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected