Branch: refs/heads/main
Home: https://github.com/pmd/pmd
Commit: 71f85f0d824939508143036219c6ababa2e0a027
https://github.com/pmd/pmd/commit/71f85f0d824939508143036219c6ababa2e0a027
Author: fudian <[email protected]>
Date: 2026-08-07 (Fri, 07 Aug 2026)
Changed paths:
M docs/pages/release_notes.md
M
pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/documentation/CommentSizeRule.java
M pmd-java/src/main/resources/category/java/documentation.xml
M
pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/documentation/xml/CommentSize.xml
Log Message:
-----------
[java] Fix #6270: CommentSize skips file header comments (#6948)
* [java] CommentSize: skip file header comments (#6270)
The rule documents that "non-header comments" are checked, but the
implementation checked every comment, producing false positives for
typical multi-line license/copyright headers (e.g. ASLv2).
A comment is now considered part of the file header when it ends before
the first code token of the compilation unit (the package/import/type/
module declaration) and is then skipped. The documentation example is
also corrected: the previous one had a single non-empty line only (so
the line count would not flag it) and would be a header comment.
Fixes #6270
Signed-off-by: 付典 <[email protected]>
* keep release notes ordered alphabetically
---------
Signed-off-by: 付典 <[email protected]>
Co-authored-by: Sören Glimm <[email protected]>
To unsubscribe from these emails, change your notification settings at
https://github.com/pmd/pmd/settings/notifications
_______________________________________________
Pmd-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmd-commits