You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/02/18 00:42:12 UTC
[commons-geometry] 01/04: Allow 1 as a magic number
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-geometry.git
commit 0880ae35e30767dc121f4175f0432b4e7d802ada
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 00:28:38 2020 +0000
Allow 1 as a magic number
---
src/main/resources/pmd/pmd-ruleset.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml
index 92d8907..0307f27 100644
--- a/src/main/resources/pmd/pmd-ruleset.xml
+++ b/src/main/resources/pmd/pmd-ruleset.xml
@@ -62,4 +62,10 @@
<!-- <exclude name="..." /> -->
</rule>
+ <rule ref="category/java/errorprone.xml/AvoidLiteralsInIfCondition">
+ <properties>
+ <property name="ignoreMagicNumbers" value="-1,0,1" />
+ </properties>
+ </rule>
+
</ruleset>