codecritique 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +11 -12
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -420,19 +420,18 @@ async function runCodeReview(options) {
|
|
|
420
420
|
outputFn(reviewResult.results, options);
|
|
421
421
|
console.log(chalk.bold.green(`\nAnalysis complete for ${operationDescription}! (${duration}s)`));
|
|
422
422
|
} else {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
);
|
|
433
|
-
}
|
|
423
|
+
// No results to display (e.g., all files were excluded/skipped)
|
|
424
|
+
const message = reviewResult.message || 'All files were excluded from review (e.g., config files, lock files).';
|
|
425
|
+
console.log(chalk.yellow(message));
|
|
426
|
+
|
|
427
|
+
// Still output empty results if outputFile is specified (for CI/CD pipelines)
|
|
428
|
+
if (options.outputFile) {
|
|
429
|
+
const outputFn = options.output === 'json' ? outputJson : options.output === 'markdown' ? outputMarkdown : outputText;
|
|
430
|
+
outputFn([], options);
|
|
431
|
+
console.log(chalk.yellow(`Empty results written to: ${options.outputFile}`));
|
|
434
432
|
}
|
|
435
|
-
|
|
433
|
+
|
|
434
|
+
console.log(chalk.bold.yellow(`\nReview complete for ${operationDescription} - no reviewable files found (${duration}s)`));
|
|
436
435
|
}
|
|
437
436
|
} else {
|
|
438
437
|
console.error(chalk.red('\nCode review process failed.'));
|