core/adapters/tool.ts-prune.adapter.ts
core/adapters/tool.ts-prune.adapter.ts is a file in GovLab Quality. 17 lines of code and 3 definitions.
import type { AdvisoryToolSpec, RunnerContext } from "#types/tool.types";
import type { RunResult } from "#types/finding.types";
import { defineTool } from "#core/registries/tool.registry";
import { parseTsPruneOutput } from "#core/parsers/tool.ts-prune.parser";
import { runAdvisory } from "#core/adapters/tool.adapter";
const TOOL = "ts-prune";
const TS_PRUNE_SPEC: AdvisoryToolSpec = {
argsFor: () => [],
cwdFor: (context) => context.root,
parse: parseTsPruneOutput,
statusOk: () => true,
tool: TOOL,
};
const runTsPrune = function runTsPrune(context: RunnerContext): RunResult {
return runAdvisory(TS_PRUNE_SPEC, context);
};
defineTool({ ecosystems: ["typescript"], run: runTsPrune, tool: TOOL });