RockteMQ-AI commented on PR #11197:
URL: https://github.com/apache/rocketmq/pull/11197#issuecomment-5766416197

   ## 🤖 Automated Code Review
   
   ## Summary
   
   The PR updates the quick-start documentation to use Gradle's modern 
`implementation` configuration and adds a JDK-only checker (plus tests) to 
prevent the snippets from drifting again. The change is low-risk and 
self-contained; the main concerns are Javadoc corruption and a couple of 
maintainability issues in the new checker.
   
   ## Issues Found
   
   ### Critical
   None.
   
   ### Warning
   - **Malformed Javadoc references.** The Javadocs in the new files contain 
literal file paths where `{@link}` or `{@code}` tags should be, e.g. `{ 
@client/src/test/java/... compile}`. These will fail `javadoc` generation and 
should be cleaned up to use proper `{@code compile}` / `{@link 
DocsDependencyChecker}` syntax.
     - 
`test/src/main/java/org/apache/rocketmq/test/docs/DocsDependencyChecker.java`: 
lines 37, 52, 55, 62, 65, 149, 157, 220, 223, 227
     - 
`test/src/main/java/org/apache/rocketmq/test/docs/DependencyDeclaration.java`: 
lines 30, 33, 60, 65
   
   - **Manual `Stream` management.** `markdownDocuments()` closes the 
`Files.walk` stream in a `try/finally` block. Switching to try-with-resources 
is clearer and removes the risk of leaking the stream if `collect` throws.
     - 
`test/src/main/java/org/apache/rocketmq/test/docs/DocsDependencyChecker.java`: 
line 145
   
   ### Suggestion
   - **Hard-coded removed-configuration list.** The checker only catches 
`compile`, `runtime`, `testCompile`, and `testRuntime`. Adding `provided` and 
`apk` would cover other Gradle configurations that are no longer valid.
     - 
`test/src/main/java/org/apache/rocketmq/test/docs/DocsDependencyChecker.java`: 
`removedConfigurations()` around line 215
   
   - **Hard-coded RocketMQ group.** `ROCKETMQ_GROUP` is fixed to 
`org.apache.rocketmq`. Making it configurable would let the same utility be 
reused if docs ever cover other groups.
     - 
`test/src/main/java/org/apache/rocketmq/test/docs/DocsDependencyChecker.java`: 
line 45
   
   - **Fragile real-docs test.** 
`quickStartDocumentsUseSupportedGradleConfigurations` derives the docs root 
from `user.dir` and walks upward, which can break when run from an IDE with a 
different working directory. Consider parameterizing the docs root via a system 
property or splitting this into a dedicated integration test.
     - 
`test/src/test/java/org/apache/rocketmq/test/docs/DocsDependencyCheckerTest.java`:
 `quickStartDocumentsUseSupportedGradleConfigurations` around line 165 and 
`repositoryDocsRoot()` around line 175
   
   ## Security, Concurrency, Performance, API Compatibility
   No concerns. The new code is a single-threaded, file-local build/test 
utility with no production impact.
   
   ## Testing
   Unit tests cover the removed-configuration rule, Kotlin DSL form, code-block 
scoping, missing-version handling, and cross-document version consistency. The 
integration test against the real `docs/` directory is a good regression guard 
once the Javadoc issues are fixed.
   
   ---
   <sub>This is an automated review by RockteMQ-AI. Please verify suggestions 
before applying.</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to