fix(cli): lint with multiple api files results in invalid output#2744
Conversation
🦋 Changeset detectedLatest commit: fc23c4e 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 |
Daryna-del
left a comment
There was a problem hiding this comment.
Thanks for the contribution! The overall approach looks good, but there are
a couple of things worth addressing before merging. Could you also take a
look at why the build and test job is failing? Left a few comments.
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 0c7cf32. Configure here.
Daryna-del
left a comment
There was a problem hiding this comment.
Hey @harshit078
Left some comments, could you, please, take a look?
|
Hey @Daryna-del , I have addressed the comments you left and updated the docs along with it. Can you please review it again ? Thanks ! |
|
Hi @harshit078 ! |
|
Hey @Daryna-del , pushed a fix for the linting issue. Thanks ! |
|
Hey @Daryna-del , can you review the PR again post all test fixes ? Thanks ! |
This reverts commit ce1ca1f.
Daryna-del
left a comment
There was a problem hiding this comment.
Hey @harshit078!
Thanks again for the contribution! Everything looks good to me, let's wait for a review from technical writers 🙂
Regarding the changes I made to your PR, I was trying to adjust the release snapshot version job for testing purposes, but it didn’t work as expected, so I reverted those changes. Sorry for the confusion.
|
Hey @harshit078! |

What/Why/How?
Reference
#2692
Testing
Screenshots (optional)
Check yourself
Security
Note
Low Risk
Scoped to checkstyle output aggregation in the lint command; other formats and ignore-file generation are unchanged.
Overview
lint --format=checkstylenow emits one valid Checkstyle XML document when you pass multiple API paths in a single run. Previously each API triggered its ownformatProblemscall, which concatenated separate XML roots and broke downstream parsers.The handler buffers problems per file during the loop and calls
formatProblemsonce after all APIs finish, using combined totals. Other formats still format per API as before. Docs drop the old “lint one API at a time” warning and describe the combined<file>behavior. A unit test asserts a single aggregatedformatProblemscall for two APIs.Reviewed by Cursor Bugbot for commit fc23c4e. Bugbot is set up for automated code reviews on this repo. Configure here.