fix(cli): lint with multiple api files results in invalid output#2744
fix(cli): lint with multiple api files results in invalid output#2744harshit078 wants to merge 6 commits intoRedocly:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 1799891 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1799891. Configure here.
| maxProblems: argv['max-problems'], | ||
| totals, | ||
| version, | ||
| command: 'lint', |
There was a problem hiding this comment.
Markdown format shows misleading combined totals per file
Medium Severity
When multiple APIs are linted, the markdown format in formatProblems prints totals.errors and totals.warnings inside the per-file-group loop. Previously, formatProblems was called per-file with per-file fileTotals, so each section showed that file's counts. Now that it's called once with combined totals, every file section displays the same combined error/warning counts, making it look like each individual file has that many issues. This produces misleading markdown output.
Reviewed by Cursor Bugbot for commit 1799891. Configure here.


What/Why/How?
Reference
#2692
Testing
Screenshots (optional)
Check yourself
Security
Note
Medium Risk
Changes how
lintemits formatted output by aggregating results across multiple API files and ensuring output is still emitted on partial failure, which could affect downstream tooling that parses CLI output.Overview
Fixes multi-API
lintruns for structured formats by accumulating all per-file lint problems and totals and callingformatProblemsonce to produce a single combined report (instead of emitting per-file documents).Adds a
try/finallyso accumulated results are still output when later API linting fails, updates/extends unit tests for aggregation and partial-failure behavior, and updates docs plus a changeset to reflect the new combined structured output behavior.Reviewed by Cursor Bugbot for commit 1799891. Bugbot is set up for automated code reviews on this repo. Configure here.