From d0f2ec451a2053a9a2033bf3320285f330785d0a Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Sun, 25 Sep 2011 20:05:52 +0000 Subject: [PATCH] Applied patch 3155140: Exclude boolean getters (is*) from TooManyMethods rule. Thanks to Riku Nykanen. git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.3.x@7353 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/etc/changelog.txt | 1 + .../pmd/rules/codesize/xml/TooManyMethods.xml | 46 +++++++++++-------- pmd/rulesets/codesize.xml | 43 ++++++++--------- pmd/xdocs/credits.xml | 1 + 4 files changed, 50 insertions(+), 41 deletions(-) diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index 236001260e..b2fd91c04b 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -4,6 +4,7 @@ Add options --ignore-literals and --ignore-identifiers to the CPD command line t Fixed character reference in xml report - thanks to Seko Add C# support for CPD - thanks to Florian Bauer Fix small bug in Rule Designer UI +Improve TooManyMethods rule - thanks to a patch from Riku Nykanen New Rule: basic: DontCallThreadRun - thanks to Andy Throgmorton diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/codesize/xml/TooManyMethods.xml b/pmd/regress/test/net/sourceforge/pmd/rules/codesize/xml/TooManyMethods.xml index ef5524bd41..abe98d58e3 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/codesize/xml/TooManyMethods.xml +++ b/pmd/regress/test/net/sourceforge/pmd/rules/codesize/xml/TooManyMethods.xml @@ -58,26 +58,32 @@ Less than 10 methods, with getter/setter... 0 diff --git a/pmd/rulesets/codesize.xml b/pmd/rulesets/codesize.xml index e0998d5106..31af90d456 100644 --- a/pmd/rulesets/codesize.xml +++ b/pmd/rulesets/codesize.xml @@ -338,8 +338,8 @@ public class Foo extends Bar { externalInfoUrl="http://pmd.sourceforge.net/rules/codesize.html#TooManyMethods"> 3 @@ -350,28 +350,34 @@ have more fine grained objects. $maxmethods ] ]]> @@ -379,9 +385,4 @@ have more fine grained objects. - - - - - diff --git a/pmd/xdocs/credits.xml b/pmd/xdocs/credits.xml index 56c6d6b3cb..480fc13ebc 100644 --- a/pmd/xdocs/credits.xml +++ b/pmd/xdocs/credits.xml @@ -320,6 +320,7 @@
  • Jared Bunting - Patch to add ASTAnnotationMethodDeclaration to Java AST
  • Lucian Ciufudean - RedundantFieldInitializerRule
  • Andreas Dangel - GodClass and LawOfDemeter rules, several bugfixes and cleanup
  • +
  • Riku Nykanen - patch improving TooManyMethods rule