What is Prolint

Prolint is a tool for automated source code review of Progress 4GL code. It reads one or more sourcefiles and examines it
for bad programming practices or violations against coding standards.

Prolint does not change or rewrite source code, it is no beauty.p.

Rules

Prolint works with a customizable library of "rules".
A "rule" is a specific test that Prolint can perform on source code. Some examples:

  • every variable should be defined NO-UNDO.
  • variables that aren't accessed should be removed from the source
  • every string literal should have string attributes.
  • every internal procedure should have a comment
  • the XREF file should not contain WHOLE-INDEX or SORT-ACCESS

These are just some examples, the complete current list on page "Prolint rules".

Every rule has a 'severity-level' ranging from 0 to 9 (0=informational, 9=severe violation).


You can easily customize the severity levels to your company preferences.
You can also switch rules on/off and save these settings in any number of "profiles".

A "profile" is a set of custom preferences.

Prolint is designed to make it easy to add or remove customized rules (one of the objectives of the Open Source Project is to improve the library of rules).

Output

The output of Prolint contains the following fields:

  1. compilation unit
  2. sourcefile
  3. line number
  4. description
  5. severity-level
  6. rule identifier

The output goes to a delimited text-file or to a result window.

A delimited text-file is convenient when Prolint works on a large amount of sourcefiles in batchmode.
The text-file is formatted in a way that makes integration with IDE's possible. For example, the file can be
formatted like a search-results file for the ED4WIN programmer's editor.

The result window is a Progress 4GL window with a browse widget.
The browse widget shows Prolint output in a temp-table.
The result window is convenient when Prolint works on a single sourcefile or a small set of
sourcefiles from within the Progress ADE.


A Help-button shows help about the rule on the current browse line.

Running Prolint

Prolint can be invoked in a number of ways:

  • as a PRO*TOOL
  • in Roundtable from the "Tools" menu
  • in Roundtable during validation of a PCODE check-in.
  • from with Ed for Windows

Customizations or user-preferences are set in a stand-alone program with a GUI interface.
This program can be added to the PRO*TOOLS menu.

How it works

Prolint is a set of Progress 4GL procedures, not using any smart-objects.

The core of all parsing is performed by a DLL: proparse.dll.

Proparse.dll reads Progress 4GL source code and represents the tokens as nodes in a treeview in memory, which can be accessed from the 4GL (much like the DOM in an XML parser).

Prolint is an Open Source project.
Proparse is also an Open Source project. You can download the compiled library from http://www.joanju.com