There were a number of circumstances, specially around (but not limited to) literal sequences, were CPD would
report duplicate overlapping or partially overlapping matches. These have now been fixed, and CPD will report
only the longest non-overlapping duplicate.
These improvements apply to all supported languages, irrespective of supported flags.
β¨ New Rules
The new Java rule UnnecessaryVarargsArrayCreation reports explicit array creation
when a varargs is expected. This is more heavy to read and could be simplified.
The new Java rule ConfusingArgumentToVarargsMethod reports some confusing situations
where a varargs method is called with an inexact argument type. These may end up in a mismatch between the expected
parameter type and the actual value.
The new Java rule LambdaCanBeMethodReference reports lambda expressions that can be replaced
with a method reference. Please read the documentation of the rule for more info. This rule is now part of the Quickstart
ruleset.
π Rule Changes
JUnitTestsShouldIncludeAssert and JUnitTestContainsTooManyAsserts
have a new property named extraAssertMethodNames. With this property, you can configure which additional static
methods should be considered as valid verification methods. This allows to use custom mocking or assertion libraries.
π Fixed Issues
core
#494: [core] Adopt JApiCmp to enforce control over API changes
#4942: [core] CPD: --skip-duplicate-files has no effect (7.0.0 regression)
There were a number of circumstances, specially around (but not limited to) literal sequences, were CPD would
report duplicate overlapping or partially overlapping matches. These have now been fixed, and CPD will report
only the longest non-overlapping duplicate.
These improvements apply to all supported languages, irrespective of supported flags.
β¨ New Rules
The new Java rule UnnecessaryVarargsArrayCreation reports explicit array creation
when a varargs is expected. This is more heavy to read and could be simplified.
The new Java rule ConfusingArgumentToVarargsMethod reports some confusing situations
where a varargs method is called with an inexact argument type. These may end up in a mismatch between the expected
parameter type and the actual value.
The new Java rule LambdaCanBeMethodReference reports lambda expressions that can be replaced
with a method reference. Please read the documentation of the rule for more info. This rule is now part of the Quickstart
ruleset.
π Rule Changes
JUnitTestsShouldIncludeAssert and JUnitTestContainsTooManyAsserts
have a new property named extraAssertMethodNames. With this property, you can configure which additional static
methods should be considered as valid verification methods. This allows to use custom mocking or assertion libraries.
π Fixed Issues
core
#494: [core] Adopt JApiCmp to enforce control over API changes
#4942: [core] CPD: --skip-duplicate-files has no effect (7.0.0 regression)
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Bumps
pmd.version
from 6.41.0 to 7.1.0. Updatesnet.sourceforge.pmd:pmd-core
from 6.41.0 to 7.1.0Release notes
Sourced from net.sourceforge.pmd:pmd-core's releases.
... (truncated)
Commits
592e80d
[release] prepare release pmd_releases/7.1.07d0dfa0
Prepare pmd release 7.1.031585ac
Bump build-tools from 24-SNAPSHOT to 24d0870f3
[java] New rule ConfusingArgumentToVarargsMethod (#4971)04206ec
Revert "[ci] Disable auto-gen-config for regression tests"f5d47ac
[ci] Disable auto-gen-config for regression tests102ba1e
[ci] Disable auto-gen-config for regression testsa154f78
[doc] Update all-contributors16df3dd
[core] Make CPD report maximal, non-repeating and non-overlapping duplicates ...202943e
[java] Fix #4948 - ImplicitSwitchFallthrough false positive with nested switc...Updates
net.sourceforge.pmd:pmd-java
from 6.41.0 to 7.1.0Release notes
Sourced from net.sourceforge.pmd:pmd-java's releases.
... (truncated)
Commits
592e80d
[release] prepare release pmd_releases/7.1.07d0dfa0
Prepare pmd release 7.1.031585ac
Bump build-tools from 24-SNAPSHOT to 24d0870f3
[java] New rule ConfusingArgumentToVarargsMethod (#4971)04206ec
Revert "[ci] Disable auto-gen-config for regression tests"f5d47ac
[ci] Disable auto-gen-config for regression tests102ba1e
[ci] Disable auto-gen-config for regression testsa154f78
[doc] Update all-contributors16df3dd
[core] Make CPD report maximal, non-repeating and non-overlapping duplicates ...202943e
[java] Fix #4948 - ImplicitSwitchFallthrough false positive with nested switc...You can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show