diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index ebed99ea24..f244af04b9 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -278,6 +278,9 @@ Contributors: [Lucas Soncini](https://github.com/lsoncini) (@lsoncini), * {% rule java/documentation/CommentContent %}: The properties `caseSensitive` and `disallowedTerms` are removed. The new property `fobiddenRegex` can be used now to define the disallowed terms with a single regular expression. +* {% rule java/documentation/CommentSize %}: When determining the line-length of a comment, the leading comment + prefix markers (e.g. `*` or `//`) are ignored and don't add up to the line-length. + See also [pull request #4369](https://github.com/pmd/pmd/pull/4369). **Java Error Prone** diff --git a/docs/pages/release_notes_pmd7.md b/docs/pages/release_notes_pmd7.md index 50201d62c3..8e246be58b 100644 --- a/docs/pages/release_notes_pmd7.md +++ b/docs/pages/release_notes_pmd7.md @@ -613,6 +613,9 @@ Related issue: [[core] Explicitly name all language versions (#4120)](https://gi * {% rule java/documentation/CommentContent %}: The properties `caseSensitive` and `disallowedTerms` are removed. The new property `fobiddenRegex` can be used now to define the disallowed terms with a single regular expression. +* {% rule java/documentation/CommentSize %}: When determining the line-length of a comment, the leading comment + prefix markers (e.g. `*` or `//`) are ignored and don't add up to the line-length. + See also [pull request #4369](https://github.com/pmd/pmd/pull/4369). **Java Error Prone** diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/documentation/xml/CommentSize.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/documentation/xml/CommentSize.xml index 632ecb1bf1..057b91d81e 100755 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/documentation/xml/CommentSize.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/documentation/xml/CommentSize.xml @@ -29,7 +29,7 @@ public class Foo { ]]> - Line too long + #4369 Line too long 5 1 5 @@ -37,7 +37,7 @@ public class Foo { // -/* 4 +/* 12345 * 5 way too long */ public class Foo {