@codacy/gate-cli 0.10.1 → 0.11.0

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.
Files changed (2) hide show
  1. package/bin/gate.js +22 -4
  2. package/package.json +1 -1
package/bin/gate.js CHANGED
@@ -12306,11 +12306,13 @@ async function runAnalyze(opts, globals) {
12306
12306
 
12307
12307
  `);
12308
12308
  }
12309
- if (findings.length > 0) {
12310
- process.stderr.write(`${BOLD}Found ${findings.length} issues. Fix the critical and high severity ones:${NC}
12309
+ const agentFindings = findings.filter((f) => f.scope !== "pre-existing");
12310
+ const preExistingFindings = findings.filter((f) => f.scope === "pre-existing");
12311
+ if (agentFindings.length > 0) {
12312
+ process.stderr.write(`${BOLD}Found ${agentFindings.length} issues in your changes. Fix the critical and high severity ones:${NC}
12311
12313
 
12312
12314
  `);
12313
- for (const f of findings) {
12315
+ for (const f of agentFindings) {
12314
12316
  const severity = (f.severity ?? "").toUpperCase();
12315
12317
  const title = f.title ?? "";
12316
12318
  const file = f.file ?? "";
@@ -12331,6 +12333,22 @@ async function runAnalyze(opts, globals) {
12331
12333
  process.stderr.write("\n");
12332
12334
  }
12333
12335
  }
12336
+ if (preExistingFindings.length > 0) {
12337
+ process.stderr.write(`${DIM}\u2501\u2501\u2501 Pre-existing issues (not caused by your changes, informational only) \u2501\u2501\u2501${NC}
12338
+
12339
+ `);
12340
+ for (const f of preExistingFindings) {
12341
+ const severity = (f.severity ?? "").toUpperCase();
12342
+ const title = f.title ?? "";
12343
+ const file = f.file ?? "";
12344
+ const line = f.line ?? "";
12345
+ process.stderr.write(`${DIM}[${severity}] ${title}
12346
+ `);
12347
+ process.stderr.write(` File: ${file}:${line}${NC}
12348
+
12349
+ `);
12350
+ }
12351
+ }
12334
12352
  if (viewUrl) {
12335
12353
  process.stderr.write(`${CYAN}View full report: ${viewUrl}${NC}
12336
12354
 
@@ -12616,7 +12634,7 @@ function registerInitCommand(program2) {
12616
12634
  }
12617
12635
 
12618
12636
  // src/cli.ts
12619
- program.name("gate").description("CLI for GATE.md quality gate service").version("0.10.1").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr");
12637
+ program.name("gate").description("CLI for GATE.md quality gate service").version("0.11.0").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr");
12620
12638
  registerAuthCommands(program);
12621
12639
  registerHooksCommands(program);
12622
12640
  registerIntentCommands(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/gate-cli",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "CLI for GATE.md quality gate service",
5
5
  "bin": {
6
6
  "gate": "./bin/gate.js"