You are here

PowerTimes Review

The following review of PB Code Analyzer is from the Little Helpers column in the September/October 1998 issue of PowerTimes magazine. In this regular column Arthur Hefti introduces and reviews useful tools, often shareware, which every developer should take a look at.

This article is reprinted in its entirety, with no modifications (with the exception of HTML formatting) with the permission of PowerTimes magazine and Arthur Hefti.

PowerBuilder Code Analyzer 1.3a

From Ascension Labs, LLC and reviewed by Arthur Hefti

Introduction

PowerBuilder Code Analyzer is a useful utility that primarily checks your coding standards but can also be used to search for objects and variables and to maintain your PB.INI.

The program comes as a single executable of about 4 MB and can be installed without any problems. It requires the PB 6 VM to run.

PowerBuilder Code Analyzer is a MDI application with one main toolbar. After starting it, you have access to various gadgets and configuration settings as well as being able to start each of the main functions.

Code Analyzer

Before running Code Analyzer, you can configure many different items. These are saved in various profiles and are listed below:

  • Library: maximum size of a PBL and the maximum number of objects within them.
  • Object: for each object and control type you can specify which property to check and what value it should have.
  • Script: specify which variable scopes to check and what the prefixes of these variables are. Also choose whether to check argument prefixes and constant naming. In addition you can check for comment blocks in both event and function headers.
  • Y2K: specify which Date and DateTime formats for DataWindows are valid and whether to check them. You also have the possibility to add strings to search for. This allows you to check the code in this area for Y2K compliance.

After defining the settings, you switch to the Source Code tab and select the project to analyze. Within the project you can specify which libraries to analyze. It doesn't make sense to analyze your own framework in each project or to analyze a 3rd party framework with different coding standards than your product.

The analysis takes a few minutes for large projects and shows you a report in print preview mode with all the found issues. Before printing you can specify a filter for this report using a very handy dialog.

Object Searcher

The Object Searcher allows you to scan all objects for certain strings. When the search is finished it shows you the object containing the search string in a report.

INI Maintenance

What I found very useful was the PB INI Maintenance. It loads all the projects from the PB.INI and checks whether the specified application exists within the given PBL. You can either delete the INI entry or fix it, which means that invalid PBLs will be removed from the library search path.

Variable Maintenance

You can specify the types and scopes of the variables to search for and also the retrieval arguments and columns of DataWindows. After the search all the variables, arguments and columns are listed in a report showing their location, scope and type.

In My Opinion

PowerBuilder Code Analyzer is an easy to use yet powerful utility that helps you keep to your standards. You will be amazed at what “non-standards” this tool will find in your applications. As it comes with a 15-day trial period you've got nothing to lose by downloading and trying it.

Availability and Pricing

You can download an evaluation version from the Ascension Labs web site at www.ascensionlabs.com. The evaluation version runs for 15 days before you have to register.

Contact Us

For information about Solution, Services, or General Inquiries, contact us at:                                                              +1 (720) 305-0050.