Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dws (341)

dws
  (email not shown publicly)
http://www.davewsmith.com/

Journal of dws (341)

Tuesday August 26, 2003
06:38 PM

Sneaking Perl in to a J2EE project

[ #14338 ]
For the n+1st time in my career, I've snuck Perl into a non-Perl project by writing a script that scans the code base looking for certain patterns. This time around I'm looking for "@todo" and "FIX" markers in the code (we haven't standardized on a way of recording "this needs attention"), and for property names in code that don't have corresponding entries in the properties files (something otherwise detectable only at runtime).

Eventually, this will grow to give us incremental counts of files and lines, so that we can chart "growth" in the codebase (for our own curiousity). I'll probably have to add a "does each file contain the correct copyright/disclaimer" at some point.

In projects past, people have found the results of these scripts so handy that any objection to Perl is quickly overcome.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • ...but the amazing IntelliJ IDEA [intellij.com] IDE does this stuff (finding todos) for you -- customizable with regexen even. If you haven't used it before I strongly recommend it -- this is coming from a person who never thought he'd get away from xemacs for doing any sort of programming. If work didn't buy me a copy and I did Java programming in my spare time I might even buy a copy for myself -- it's that good.
  • I have also sneaked Perl into many Java projects. Monitoring, reformatting SQL build scripts, and automating various things that my Java-steeped co-workers thought couldn't be automated are pretty routine tasks for Perl in a Java shop.