Finding variables named 'enum'

11 Apr 2006

I was going through the JavaCC and JJTree code this morning updating all the places where enum was used as an identifier - changing those variable names to "enumeration". At first I was using egrep to flail around, and was hitting lots of valid usages... workable, but somewhat tedious.

Then I remembered that there's a PMD rule to find just this problem! I plugged that rule into IDEA, ran it a few times, fixed the problems, and checked in the changes. Good times!

It seems like there are more things that could be added to the migration rulesets, but I'm not sure what they are. Maybe more things will pop up as I continue to trawl around JavaCC's code.