diff --git a/packages/cli/src/commands/lint.ts b/packages/cli/src/commands/lint.ts index 50fcb89aca..aaab792579 100644 --- a/packages/cli/src/commands/lint.ts +++ b/packages/cli/src/commands/lint.ts @@ -308,7 +308,7 @@ const scoringThresholdNotEnough = (results: IRuleResult[], scoringConfig: Scorin getScoringLevel( getCountsBySeverity(groupedUniqueResults), scoringConfig.scoringSubtract, - scoringConfig.warningsSubtract, + scoringConfig.onlySubtractHigherSeverityLevel, ) ); } diff --git a/packages/cli/src/services/__tests__/__fixtures__/scoring-config.json b/packages/cli/src/services/__tests__/__fixtures__/scoring-config.json index 9ce0e27a48..4d6abc0b33 100644 --- a/packages/cli/src/services/__tests__/__fixtures__/scoring-config.json +++ b/packages/cli/src/services/__tests__/__fixtures__/scoring-config.json @@ -27,6 +27,6 @@ "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } \ No newline at end of file diff --git a/packages/cli/src/services/__tests__/output.test.ts b/packages/cli/src/services/__tests__/output.test.ts index 50ebba3817..88d38eeafe 100644 --- a/packages/cli/src/services/__tests__/output.test.ts +++ b/packages/cli/src/services/__tests__/output.test.ts @@ -28,7 +28,7 @@ const scoringConfig = { E: 0, } as unknown as ScoringLevel[], threshold: 50, - warningsSubtract: true, + onlySubtractHigherSeverityLevel: true, uniqueErrors: false, }; diff --git a/test-harness/scenarios/formats/results-default-format-scoring-json.scenario b/test-harness/scenarios/formats/results-default-format-scoring-json.scenario index e6eb4aa700..56a9b97c27 100644 --- a/test-harness/scenarios/formats/results-default-format-scoring-json.scenario +++ b/test-harness/scenarios/formats/results-default-format-scoring-json.scenario @@ -79,7 +79,7 @@ info: "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } ====command==== diff --git a/test-harness/scenarios/formats/results-default-scoring.scenario b/test-harness/scenarios/formats/results-default-scoring.scenario index c5c19519d3..4757b259ca 100644 --- a/test-harness/scenarios/formats/results-default-scoring.scenario +++ b/test-harness/scenarios/formats/results-default-scoring.scenario @@ -79,7 +79,7 @@ info: "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } ====command==== diff --git a/test-harness/scenarios/formats/results-format-stylish-scoring.scenario b/test-harness/scenarios/formats/results-format-stylish-scoring.scenario index a489464695..93f99854ee 100644 --- a/test-harness/scenarios/formats/results-format-stylish-scoring.scenario +++ b/test-harness/scenarios/formats/results-format-stylish-scoring.scenario @@ -80,7 +80,7 @@ paths: {} "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } ====command==== diff --git a/test-harness/scenarios/overrides/aliases-scoring.scenario b/test-harness/scenarios/overrides/aliases-scoring.scenario index 8cc493ef2a..12b9d40619 100644 --- a/test-harness/scenarios/overrides/aliases-scoring.scenario +++ b/test-harness/scenarios/overrides/aliases-scoring.scenario @@ -93,7 +93,7 @@ module.exports = { "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } ====asset:v2/document.json==== diff --git a/test-harness/scenarios/severity/fail-on-error-no-error-scoring.scenario b/test-harness/scenarios/severity/fail-on-error-no-error-scoring.scenario index 41fbd4a9e3..66dfb2b872 100644 --- a/test-harness/scenarios/severity/fail-on-error-no-error-scoring.scenario +++ b/test-harness/scenarios/severity/fail-on-error-no-error-scoring.scenario @@ -47,7 +47,7 @@ Will only fail if there is an error, and there is not. Can still see all warning "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } ====command==== diff --git a/test-harness/scenarios/severity/fail-on-error-scoring.scenario b/test-harness/scenarios/severity/fail-on-error-scoring.scenario index 3996bbe773..b30c9b5e5f 100644 --- a/test-harness/scenarios/severity/fail-on-error-scoring.scenario +++ b/test-harness/scenarios/severity/fail-on-error-scoring.scenario @@ -58,7 +58,7 @@ Will fail and return 1 as exit code because errors exist with scoring data "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } ====command-nix==== diff --git a/test-harness/scenarios/valid-no-errors.oas2-scoring.scenario b/test-harness/scenarios/valid-no-errors.oas2-scoring.scenario index 2d13af4945..50c16f90b6 100644 --- a/test-harness/scenarios/valid-no-errors.oas2-scoring.scenario +++ b/test-harness/scenarios/valid-no-errors.oas2-scoring.scenario @@ -47,7 +47,7 @@ module.exports = oas; "E": 0 }, "threshold": 50, - "warningsSubtract": true, + "onlySubtractHigherSeverityLevel": true, "uniqueErrors": false } ====command====