Wednesday, December 07, 2005

Counting lines of code

Need to generate lines of code statistics for your project? For PowerBuilder, you're best served by PBL Peeper or Visual Expert. It's not immediately obvious how to do it with PBL Peeper, but if you go to Lists, then Scripts, and then select View->Show from the menu, you'll be presented with a dialog that allows you to add Line Count to the report.

PBL Peeper

If you've got to count lines of code for anything else, you might want to check out Code Counter Pro. Somewhat similar to SlickEdit, you define for a particular file extension how to distnguish between code lines and comment lines.

Code Counter

Then for a particular analysis you select the different file extensions that should be analyzed.

Code Counter

If your PowerBuilder project is under source control and you don't have "Delete PowerBuilder generated object files" checked in the source control settings, you could easily run Code Counter Pro on the PowerBuilder source files (they're generated by the source control system in the directory with the PBLs). The issue is that Code Counter Pro will include all of the system generated code lines as well (create and destroy scripts, etc.). Generally that's not the information that people are looking for when they are looking for code line counts for PowerBuilder projects.

No comments: