#5 Class and method variable name check

release_3.0
closed
Check (274)
5
2012-10-10
2001-10-16
No

One poor coding practice is to have class and method
(or parameter) variables of the same name, requiring
programmers to explicitely qualify access to the class
variables (e.g.- this.name). This can lead to
potential bugs if they forget to qualify their
references. It would be really useful to check for
these occurances.

Discussion

  • Oliver Burn

    Oliver Burn - 2002-01-14

    Logged In: YES
    user_id=218824

    I like this suggestion.

     
  • Oliver Burn

    Oliver Burn - 2002-02-09

    Logged In: YES
    user_id=218824

    postpone until do checks for unused variables

     
  • Lars Kühne

    Lars Kühne - 2003-01-04

    Logged In: YES
    user_id=401384

    This is now implemented in CVS (HiddenField check) and will
    be available with Checkstyle 3.0

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks