Menu

#1232 Make ShortClassName configurable

PMD-5.1.3
closed
None
PMD
3-Major
Feature-Request
5.1.2
2014-08-31
2014-08-04
blundell
No

Isbn.java:3, ShortClassName, Priority: Normal
A Classname should have a minimum of five characters.

Card.java:7, ShortClassName, Priority: Normal
A Classname should have a minimum of five characters.

Isbn & Card are both valid class names, should this rule be changed to four characters?

Discussion

  • Anthony Whitford

    You could annotate these two classes like @SuppressWarning("PMD.ShortClassName")

    But I also like the idea of having a variable for the minimum, like for LongVariable.

     
  • Andreas Dangel

    Andreas Dangel - 2014-08-11

    I've implemented this as a feature-request. With the next release, you can configure the rule via the property "minimum". By default, this will be still 5 characters, but you can change it to four then.

     
  • Andreas Dangel

    Andreas Dangel - 2014-08-11
    • summary: ShortClassName false positive --> Make ShortClassName configurable
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-next
    • Type: Bug --> Feature-Request
     

Log in to post a comment.