GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — [java] New Rule: DanglingJavadoc by zbynek · Pull Request #5916 · pmd/pmd Conversation
|
|
Compared to main: (comment created at 2025-07-18 22:14:18+00:00 for 9d61ef4) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
is this within the scope of PMD, or is it enough that it's handled by CheckStyle?
Yes, I think so. We have a couple of style related rules in category "Code Style". And the category "Documentation" for this new rule sounds correct as well.
better name ideas?
DanglingJavadoc sounds good. Let's go with that.
should /// be always treated like Javadoc, even if given project is not using Java 23?
I'd say yes. Let's keep it simple for now.
I'll fix the small things myself and merge it afterwards for 7.17.0.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Compared to main: (comment created at 2025-09-11 08:26:46+00:00 for 683c820) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…efore Java 23 DanglingJavadoc reported the new markdown javadoc syntax (///) as dangling even on Java versions that don't support it (< 23, JEP 467). Only treat /// as a markdown javadoc comment from Java 23 onwards; before that it is plain commentary and not dangling. Addresses zbynek's review: - release note and test descriptions refer to markdown javadoc as /// (not ////). - scope kept at the rule layer (no parser-level change), aligning with the keep-simple decision in pmd#5916; a parser-level /// recognition is left for the maintainer to decide. Signed-off-by: 付典 <[email protected]>
…e Java 23 Markdown documentation comments (JEP 467) are available since Java 23. ASTCompilationUnit#setComments now collapses consecutive /// comments into JavadocComments only when the language version is >= 23, so on older versions they stay ordinary single line comments and are no longer reported by DanglingJavadoc. Other comment consumers see the same consistent model. This supersedes the "keep it simple for now" decision from pmd#5916, see the discussion in pmd#6450 and pmd#6951. Signed-off-by: 付典 <[email protected]>
…) before Java 23 (#6951) * [java] Fix #6450: Treat /// comments as markdown javadoc only since Java 23 Markdown documentation comments (JEP 467) are available since Java 23. ASTCompilationUnit#setComments now collapses consecutive /// comments into JavadocComments only when the language version is >= 23, so on older versions they stay ordinary single line comments and are no longer reported by DanglingJavadoc. Other comment consumers see the same consistent model. This supersedes the "keep it simple for now" decision from #5916, see the discussion in #6450 and #6951. Signed-off-by: 付典 <[email protected]> * fix comment * fix which versions to test --------- Signed-off-by: 付典 <[email protected]> Co-authored-by: Sören Glimm <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.