[doc] Update release notes, new rule UnusedAssignment
This commit is contained in:
@ -14,6 +14,12 @@ This is a {{ site.pmd.release_type }} release.
|
|||||||
|
|
||||||
### New and noteworthy
|
### New and noteworthy
|
||||||
|
|
||||||
|
#### New Rules
|
||||||
|
|
||||||
|
* The new Java rule {% rule "java/bestpractices/UnusedAssignment" %} (`java-bestpractices`) finds assignments
|
||||||
|
to variables, that are never used and are useless. The new rule is supposed to entirely replace
|
||||||
|
{% rule "java/errorprone/DataflowAnomalyAnalysis" %}.
|
||||||
|
|
||||||
### Fixed Issues
|
### Fixed Issues
|
||||||
|
|
||||||
### API Changes
|
### API Changes
|
||||||
|
13
pmd-core/src/main/resources/rulesets/releases/6260.xml
Normal file
13
pmd-core/src/main/resources/rulesets/releases/6260.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<ruleset name="6260"
|
||||||
|
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
|
||||||
|
<description>
|
||||||
|
This ruleset contains links to rules that are new in PMD v6.26.0
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<rule ref="category/java/bestpractices.xml/UnusedAssignment" />
|
||||||
|
|
||||||
|
</ruleset>
|
@ -1316,7 +1316,8 @@ class Foo{
|
|||||||
|
|
||||||
The rule may be suppressed with the standard `@SuppressWarnings("unused")` tag.
|
The rule may be suppressed with the standard `@SuppressWarnings("unused")` tag.
|
||||||
|
|
||||||
The rule subsumes UnusedLocalVariable, and UnusedFormalParameter. Those violations are filtered
|
The rule subsumes {% rule "UnusedLocalVariable" %}, and {% rule "UnusedFormalParameter" %}.
|
||||||
|
Those violations are filtered
|
||||||
out by default, in case you already have enabled those rules, but may be enabled with the property
|
out by default, in case you already have enabled those rules, but may be enabled with the property
|
||||||
`reportUnusedVariables`. Variables whose name starts with `ignored` are filtered out, as
|
`reportUnusedVariables`. Variables whose name starts with `ignored` are filtered out, as
|
||||||
is standard practice for exceptions.
|
is standard practice for exceptions.
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
<!-- <rule ref="category/java/bestpractices.xml/ReplaceVectorWithList" /> -->
|
<!-- <rule ref="category/java/bestpractices.xml/ReplaceVectorWithList" /> -->
|
||||||
<rule ref="category/java/bestpractices.xml/SwitchStmtsShouldHaveDefault"/>
|
<rule ref="category/java/bestpractices.xml/SwitchStmtsShouldHaveDefault"/>
|
||||||
<!-- <rule ref="category/java/bestpractices.xml/SystemPrintln" /> -->
|
<!-- <rule ref="category/java/bestpractices.xml/SystemPrintln" /> -->
|
||||||
|
<!-- <rule ref="category/java/bestpractices.xml/UnusedAssignment"/> -->
|
||||||
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
|
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
|
||||||
<rule ref="category/java/bestpractices.xml/UnusedImports"/>
|
<rule ref="category/java/bestpractices.xml/UnusedImports"/>
|
||||||
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/>
|
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/>
|
||||||
|
Reference in New Issue
Block a user