diff --git a/packages/core/src/lib/collect-and-persist.ts b/packages/core/src/lib/collect-and-persist.ts index 21c379695..f7aaeda49 100644 --- a/packages/core/src/lib/collect-and-persist.ts +++ b/packages/core/src/lib/collect-and-persist.ts @@ -28,6 +28,7 @@ export async function collectAndPersistReports( const report = await collect(options); const sortedScoredReport = sortReport(scoreReport(report)); + const persistResults = await persistReport( report, sortedScoredReport, diff --git a/packages/plugin-eslint/src/lib/runner/index.ts b/packages/plugin-eslint/src/lib/runner/index.ts index e740549ea..b18967e53 100644 --- a/packages/plugin-eslint/src/lib/runner/index.ts +++ b/packages/plugin-eslint/src/lib/runner/index.ts @@ -12,6 +12,7 @@ import { filePathToCliArg, objectToCliArgs, readJsonFile, + ui, } from '@code-pushup/utils'; import type { ESLintPluginRunnerConfig, ESLintTarget } from '../config.js'; import { lint } from './lint.js'; @@ -25,6 +26,8 @@ export async function executeRunner({ const { slugs, targets } = await readJsonFile(runnerConfigPath); + ui().logger.log(`ESLint plugin executing ${targets.length} lint targets`); + const linterOutputs = await targets.reduce( async (acc, target) => [...(await acc), await lint(target)], Promise.resolve([]), diff --git a/packages/utils/src/lib/execute-process.ts b/packages/utils/src/lib/execute-process.ts index e561a18a0..0359c7519 100644 --- a/packages/utils/src/lib/execute-process.ts +++ b/packages/utils/src/lib/execute-process.ts @@ -1,3 +1,4 @@ +import { gray } from 'ansis'; import { type ChildProcess, type ChildProcessByStdio, @@ -6,6 +7,7 @@ import { spawn, } from 'node:child_process'; import type { Readable, Writable } from 'node:stream'; +import { ui } from './logging.js'; import { calcDuration } from './reports/utils.js'; /** @@ -148,6 +150,9 @@ export function executeProcess(cfg: ProcessConfig): Promise { const date = new Date().toISOString(); const start = performance.now(); + const logCommand = [command, ...(args || [])].join(' '); + ui().logger.log(gray(`Executing command:\n${logCommand}`)); + return new Promise((resolve, reject) => { // shell:true tells Windows to use shell command for spawning a child process const spawnedProcess = spawn(command, args ?? [], {