Merge branch 'master' into pmd/7.0.x

This commit is contained in:
Andreas Dangel committed 2021-06-26 10:01:43 +02:00
commit ff99ac03d4
3 files changed
+26 -2

No files matched your search

+3 -2
View File
@@ -22,8 +22,8 @@ This is a {{ site.pmd.release_type }} release.
#### Improved Incremental Analysis
[Incremental Analysis](https://pmd.github.io/pmd-6.36.0/pmd_userdocs_incremental_analysis.html) has long helped
our users obtain faster analysis results, however, it's implementation tended to be too cautious in detecting
changes to the runtime and type resolution classpaths, producing more cache invalidations than were necessary.
our users obtain faster analysis results, however, its implementation tended to be too cautious in detecting
changes to the runtime and type resolution classpaths, producing more cache invalidations than necessary.
We have now improved the heuristics to remove several bogus invalidations, and slightly sped up the cache
usage along the way.
@@ -70,6 +70,7 @@ PMD will now ignore:
* [#3323](https://github.com/pmd/pmd/pull/3323): \[core] Adds fullDescription and tags in SARIF report
* java-bestpractices
* [#957](https://github.com/pmd/pmd/issues/957): \[java] GuardLogStatement: False positive with compile-time constant arguments
* [#3076](https://github.com/pmd/pmd/pull/3076): \[java] UnusedAssignment reports unused variable when used in increment expr
* [#3114](https://github.com/pmd/pmd/issues/3114): \[java] UnusedAssignment false positive when reporting unused variables
* [#3315](https://github.com/pmd/pmd/issues/3315): \[java] LiteralsFirstInComparisons false positive with two constants
* [#3341](https://github.com/pmd/pmd/issues/3341): \[java] JUnitTestsShouldIncludeAssert should support Junit 5
@@ -770,6 +770,7 @@ public final class DataflowPass {
@Override
public SpanInfo visit(ASTUnaryExpression node, SpanInfo data) {
super.visit(node, data);
data = acceptOpt(node.getOperand(), data);
if (node.getOperator().isPure()) {
@@ -3438,6 +3438,28 @@ public class UnusedAssignmentNative {
}
]]></code>
</test-code>
<test-code>
<description>[java] UnusedAssignment false positive in for-each assignment #3076</description>
<rule-property name="reportUnusedVariables">true</rule-property>
<expected-problems>0</expected-problems>
<code><![CDATA[
import static java.lang.System.arraycopy;
import static java.util.Arrays.fill;
public class RadixSort {
private static final int TEN = 10;
int[] a;
void countSort(int exp) {
int[] count = new int[TEN];
fill(count, 0);
for (int val : a) // error flagged here
count[(val / exp) % TEN]++;
}
}
]]></code>
</test-code>
<test-code>
<description>[java] UnusedAssignment false positive when reporting unused variables #3114</description>