forked from phoedos/pmd
@ -25,6 +25,10 @@ This is a {{ site.pmd.release_type }} release.
|
||||
* {%rule apex/codestyle/ClassNamingConventions %}: Two new properties to configure different patterns
|
||||
for inner classes and interfaces: `innerClassPattern` and `innerInterfacePattern`.
|
||||
|
||||
#### Renamed rules
|
||||
* {%rule ecmascript/errorprone/InaccurateNumericLiteral %} has been renamed from `InnaccurateNumericLiteral`.
|
||||
The old rule name still works but is deprecated.
|
||||
|
||||
### 🐛 Fixed Issues
|
||||
* apex
|
||||
* [#5094](https://github.com/pmd/pmd/issues/5094): \[apex] "No adapter exists for type" error message printed to stdout instead of stderr
|
||||
@ -39,6 +43,7 @@ This is a {{ site.pmd.release_type }} release.
|
||||
* java-errorprone
|
||||
* [#1488](https://github.com/pmd/pmd/issues/1488): \[java] MissingStaticMethodInNonInstantiatableClass: False positive with Lombok Builder on Constructor
|
||||
* javascript-errorprone
|
||||
* [#2367](https://github.com/pmd/pmd/issues/2367): \[javascript] InnaccurateNumericLiteral is misspelled
|
||||
* [#4716](https://github.com/pmd/pmd/issues/4716): \[javascript] InaccurateNumericLiteral with number 259200000
|
||||
* plsql
|
||||
* [#5086](https://github.com/pmd/pmd/pull/5086): \[plsql] Fixed issue with missing optional table alias in MERGE usage
|
||||
@ -49,6 +54,10 @@ This is a {{ site.pmd.release_type }} release.
|
||||
|
||||
### 🚨 API Changes
|
||||
|
||||
* javascript
|
||||
* The old rule name `InnaccurateNumericLiteral` has been deprecated. Use the new name
|
||||
{%rule ecmascript/errorprone/InaccurateNumericLiteral %} instead.
|
||||
|
||||
### ✨ External Contributions
|
||||
* [#5048](https://github.com/pmd/pmd/pull/5048): \[apex] Added Inner Classes to Apex Class Naming Conventions Rule - [Justin Stroud](https://github.com/justinstroudbah) (@justinstroudbah / @sgnl-labs)
|
||||
* [#5086](https://github.com/pmd/pmd/pull/5086): \[plsql] Fixed issue with missing optional table alias in MERGE usage - [Arjen Duursma](https://github.com/duursma) (@duursma)
|
||||
|
@ -91,12 +91,12 @@ if (someVar != 3) {
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="InnaccurateNumericLiteral"
|
||||
<rule name="InaccurateNumericLiteral"
|
||||
language="ecmascript"
|
||||
since="5.0"
|
||||
message="The numeric literal ''{0}'' will have at different value at runtime."
|
||||
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_ecmascript_errorprone.html#innaccuratenumericliteral">
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_ecmascript_errorprone.html#inaccuratenumericliteral">
|
||||
<description>
|
||||
The numeric literal will have a different value at runtime, which can happen if you provide too much
|
||||
precision in a floating point number. This may result in numeric calculations being in error.
|
||||
@ -106,6 +106,8 @@ are represented by 64bit double-precision floating point numbers internally and
|
||||
to the available precision of the number.
|
||||
See [Number.isSafeInteger()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger)
|
||||
and [Number.EPSILON](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON).
|
||||
|
||||
Note: This rule was named InnaccurateNumericLiteral before PMD 7.4.0.
|
||||
</description>
|
||||
<priority>2</priority>
|
||||
<properties>
|
||||
@ -130,4 +132,5 @@ var z = 1.12345678901234567; // Not good
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="InnaccurateNumericLiteral" ref="InaccurateNumericLiteral" deprecated="true"/>
|
||||
</ruleset>
|
||||
|
@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.ecmascript.rule.errorprone;
|
||||
|
||||
import net.sourceforge.pmd.test.PmdRuleTst;
|
||||
|
||||
class InnaccurateNumericLiteralTest extends PmdRuleTst {
|
||||
class InaccurateNumericLiteralTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
Reference in New Issue
Block a user