Menu

#1346 VariableNamingConventions do not work for method parameters

PMD-5.3.2
not-reproducible
None
PMD
2-Critical
Bug
5.3.0
2015-05-11
2015-05-06
No

Hello,

The VariableNamingConventions do not detect "_" in parameters names (I checked "Check method parameter variables" and unchecked method parameter of native methods).
It was working on versions before the 5.2 ...

Discussion

  • Denis SEMMAU

    Denis SEMMAU - 2015-05-06

    Actually, it works for most of methods.
    But an exception for this one :
    public void setHorsTout(long hors_tout) {
    this.horsTout = hors_tout;
    }

     

    Last edit: Denis SEMMAU 2015-05-06
  • Andreas Dangel

    Andreas Dangel - 2015-05-09
    • status: open --> more-info-needed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.3.2
     
  • Andreas Dangel

    Andreas Dangel - 2015-05-09

    I unfortunately can't reproduce this - are you sure, that you don't have marked the method parameter as "final"?

    PMD 5.3.1 at least correctly identified the underscore in your example...

    Here's the test case: https://github.com/pmd/pmd/commit/bc41b00206a709c2462c1d3844509afb45e12e7b

     
  • Denis SEMMAU

    Denis SEMMAU - 2015-05-11

    Well, I have sometimes this bug in specific context but I've not identified yet how to reproduce it !
    I'll post a new ticket when i'm able to reproduce it !
    Regards,

     
  • Andreas Dangel

    Andreas Dangel - 2015-05-11

    Thanks for checking! Yes, create a new ticket then.
    I'll close this one.

     
  • Andreas Dangel

    Andreas Dangel - 2015-05-11
    • status: more-info-needed --> not-reproducible
     

Log in to post a comment.

MongoDB Logo MongoDB