[Misc] Correct the java:S6213 denylist entry, and record the multi-line Javadoc convention - #77
[Misc] Correct the java:S6213 denylist entry, and record the multi-line Javadoc convention#77claude[bot] wants to merge 6 commits into
Conversation
… an API change * The entry rejects the whole rule because "a rename of a public method or field is an API change", but that is only true of the "Rename this method" half. "Rename this variable" is a parameter/local rename that changes no signature, and the message alone classifies each site. * Documented the variable half in syntax-rules with the two mechanics that make it scriptable (the look-behind that spares method calls, and skipping comment lines so the rename doesn't mangle prose). Co-Authored-By: Vincent Massol <vincent@massol.net>
* An empty catch needs a "// TODO:" asking to log a warning or to change the logic, not just a rationale comment: a catch that neither rethrows nor logs is a bug to fix later, not a decision to document. * A Javadoc comment is always multi-line, never the one-line form, and a file still using the one-line form gets converted when it is touched. Neither rule is on the dev wiki CodeStyle page. Co-Authored-By: Vincent Massol <vincent@massol.net>
…y block Co-Authored-By: Vincent Massol <vincent@massol.net>
|
Remove the part about an empty |
* Requested in review: the OKF should hold only rules that don't yield false positives, and this one does — a catch of a domain "not found" exception used as a signal is the design, not a defect to be TODO-ed. * The Javadoc multi-line rule stays; it has no such exception. Co-Authored-By: Vincent Massol <vincent@massol.net>
|
Removed — the section is gone from You're right about the false positive, and this PR is where it showed up: the rule as I stated it I've kept the nuanced version in my own routine notes (where it is conditional and carries that Title and description updated to match; Generated by Claude Code |
* Five manifests carry one version, so every concurrent pull request conflicted with every other one on those same five lines, over something that was never part of either change. The release is now cut on master after the merge by scripts/release.mjs, and scripts/validate.mjs fails a branch that touches a version field. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* The branch was failing `validate` because it ran its own stale copy of scripts/validate.mjs, which still required a bump above master's tip; master now requires the opposite — a pull request must not touch the version at all, since the release is cut on master. * No version bump here: the manifests take master's 1.5.1 unchanged. Co-Authored-By: Vincent Massol <vincent@massol.net>
|
The check ran the copy of So I merged current The merge was clean —
Thanks for the merge-base change, by the way: the stale-bump conflict it removes is the single most Generated by Claude Code |
What this corrects
okf/sonarqube/index.mddenylistsjava:S6213("Restricted Identifiers should not be used asIdentifiers") with:
That is true of the rule's method half and false of its variable half, which is most of the
pool: 16 of xwiki-commons' 18 open issues and 4 of xwiki-platform's 6 are
"Rename this variable to not match a restricted identifier"on a parameter or a local. Renamingone changes no signature, breaks no caller, and the compiler is the whole verification — the same
partial-pool shape as the
S1172correction in #71.The
messageclassifies every site with no source read, so the split costs oneissues/search.Changes
index.md— the denylist entry now covers the method half only and points at the family filefor the other half;
S6213added to thesyntax-rulesrow of the rule map.syntax-rules.md— a short entry for the variable half: the message-based classifier, the twomechanics that make it scriptable (a look-behind that spares
x.record(…)and the methoddeclarations; running per line so the rename does not mangle Javadoc prose,
@paramtagsexcepted), and the note that it belongs in its own PR rather than in a mechanical batch.
node scripts/validate.mjsandclaude plugin validate ./xwikiboth pass.Validated in production
The rescued half shipped as xwiki/xwiki-commons#1924 (16 issues) and has now been merged.
Without this correction the next run reads the entry, skips the rule, and leaves those 16 plus
platform's 4 untouched — which is what happened on every previous sweep.
Second commit: a comment convention enforced in review today
Added while the sweep this PR unblocks was being reviewed (xwiki/xwiki-platform#6221 and #6222).
It is not stated on the dev wiki's
CodeStyle page — I checked
before writing them — so a session has no way to comply without being told:
conventions/code-style.md— a Javadoc comment is always multi-line, never the one-line/** text */form, and a file still using the one-line form gets converted when it is touched.It cost a review round today; it is cheap to state and would have prevented it.
Removed on request: the empty-
catch// TODO:rule this commit originally also carried. TheOKF should hold only rules that don't yield false positives, and that one does — a
catchof adomain "not found" exception used as a signal is the design, not a defect to be TODO-ed, which is
precisely the exception that came up while reviewing xwiki/xwiki-platform#6221.
Generated by Claude Code