You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2026/06/24 14:34:09 UTC
[PR] Clarify final usage in coding standards [shardingsphere]
terrymanu opened a new pull request, #38907:
URL: https://github.com/apache/shardingsphere/pull/38907
Clarify that final on parameters is limited to method parameters, constructor parameters, and catch parameters, while local variables, loop variables, enhanced-for variables, try-with-resources resources, and lambda parameters should avoid it.
Synchronize the rule across the root coding standard, the English and Chinese community docs, and the AI agent handoff guidance.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clarify final usage in coding standards [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #38907:
URL: https://github.com/apache/shardingsphere/pull/38907#issuecomment-4790429417
### Summary
**Review Result: Mergeable**
Reason: The PR is a focused coding-standard documentation update. It clarifies the `final` usage rule in the root code of conduct, synchronizes the English and Chinese community docs, and updates the AI agent guidance without introducing runtime, API, dependency, or distribution changes.
### Evidence
- The PR replaces the underspecified rule `Local variables should not be set as final.` with three explicit rules covering parameter `final`, local variables, and lambda parameters in:
- `CODE_OF_CONDUCT.md`
- `docs/community/content/involved/conduct/code.en.md`
- `docs/community/content/involved/conduct/code.cn.md`
- The English and Chinese docs now mirror the root coding standard: method parameters, constructor parameters, and `catch` parameters are the allowed parameter cases; ordinary local declarations, loop variables, enhanced `for` variables, try-with-resources resources, and lambda parameters should avoid `final` unless tooling or nearby style requires it.
- `AGENTS.md` was updated consistently with the coding standard and adds a concrete handoff check for newly added meaningless local-variable `final` declarations.
- No linked issue, public review comment, inline thread, generated artifact, dependency, release artifact, runtime behavior, or user migration impact was found in the reviewed PR scope.
### Review Details
Reviewed Scope: Latest PR head `84b2aea07b6373698d8e12df619ae054d9d214e1`, base `master` at `9fa7d7e3089bb52d7861bafdbf0bfda5e0ca290c`, merge-base `9fa7d7e3089bb52d7861bafdbf0bfda5e0ca290c`. GitHub `/pulls/38907/files` matched the local triple-dot file list: `AGENTS.md`, `CODE_OF_CONDUCT.md`, `docs/community/content/involved/conduct/code.cn.md`, and `docs/community/content/involved/conduct/code.en.md`.
Not Reviewed Scope: CI/check-run logs were not reviewed because the change is docs/rules-only and local repository-declared formatting/style gates passed. Runtime tests were not run because no production or test code behavior changed.
Verification:
- Public PR metadata and file list inspected through GitHub REST API: success.
- Public issue comments, PR reviews, and inline review comments checked: no existing public feedback found.
- `git fetch --quiet apache master`: exit 0.
- Local PR file list from `git diff --name-only <merge-base>..HEAD`: exit 0, matched GitHub files.
- `./mvnw spotless:check -Pcheck -T1C`: exit 0, `BUILD SUCCESS`.
- `./mvnw checkstyle:check -Pcheck -T1C`: exit 0, `BUILD SUCCESS`.
- `git diff --check <merge-base>..HEAD -- <reviewed files>`: exit 0.
Release Note / User Docs: Release note is not required because this is a contributor coding-standard clarification with no runtime or upgrade behavior. User-facing community docs are updated in both English and Chinese.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Clarify final usage in coding standards [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #38907:
URL: https://github.com/apache/shardingsphere/pull/38907
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org