Repository navigation
[Java] Run Azure SDK lint rules on generated test clients - #12756
Open
Weidong Xu (weidongxu-microsoft) wants to merge 2 commits into
Open
Weidong Xu (weidongxu-microsoft) wants to merge 2 commits into
Weidong Xu (weidongxu-microsoft) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: caff69e4-5771-496b-b598-b533a2a45f30
Contributor
|
All changed packages have been documented.
Show changes
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The PowerShell changes break the build-test fixture by requiring reports its Maven stub never creates, while an empty Checkstyle regex alternative disables line-length enforcement.
2 open issues
What changed in this PR
Adds report-only Azure SDK lint checks to generated Java Spector clients. ClientCore remains unchanged.
Changes:
- Runs Checkstyle and SpotBugs during Maven
verify. - Uploads XML reports to CI and ensures Spector cleanup.
- Adds SDK rules, suppressions, licensing, and an internal changelog entry.
| File | Description |
|---|---|
packages/http-client-java/generator/http-client-generator-test/Spector-Tests.ps1 |
Runs analysis, uploads reports, and stops the server. |
packages/http-client-java/generator/http-client-generator-test/pom.xml |
Configures report-only analyzers. |
packages/http-client-java/generator/http-client-generator-test/linting/spotbugs-include.xml |
Defines included bug patterns. |
packages/http-client-java/generator/http-client-generator-test/linting/spotbugs-exclude.xml |
Adds SDK bug exclusions. |
packages/http-client-java/generator/http-client-generator-test/linting/LICENSE.txt |
Includes the imported rules’ license. |
packages/http-client-java/generator/http-client-generator-test/linting/checkstyle.xml |
Adds SDK checks and temporary assignment suppression. |
packages/http-client-java/generator/http-client-generator-test/linting/checkstyle-suppressions.xml |
Adds SDK Checkstyle suppressions. |
.chronus/changes/eng-java-azure-generated-code-lint.md |
Records the internal tooling change. |
Review effort: Balanced
|
You can try these changes here
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: caff69e4-5771-496b-b598-b533a2a45f30
Weidong Xu (weidongxu-microsoft)
marked this pull request as ready for review
December 5, 2026 05:21
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Run Azure SDK Track 2 Checkstyle and SpotBugs on generated clients in the Azure Java Spector module. Checkstyle loads the SDK's Java-backed rules and retains the temporary
InnerAssignmentsuppression for generatedimplementation/*ClientImpl.javafiles. ClientCore is unchanged.Findings are report-only because existing fixtures do not all follow SDK conventions. CI attaches both XML reports to the test task.
Validated with the Azure Spector script and the emitter build, format, and lint commands.