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 practice
When you are interested Prolint, you are encouraged to subscribe to this group where you find the on-line tools to collaborate and discuss Prolint. There is a discussion forum, you can submit issues (for bugs and enhancement requests), you can modify the on-line documentation. So subscribe, and then don't forget to go to your subscription details to enable the e-mail notification!
# this file specifies which particular warnings should be suppressed. The rules will # still be executed, but warnings are intercepted if they match this file. # You can also consider using {&_proparse_ prolint-nowarn(ruleid,ruleid)} directives # # format: # sourcefile|rule|linenumbers # sourcefile|_file-size|size # # sourcefile : spell exactly as it appears in "Prolint result window" # rule : identifier of the rule that gives the warning # linenumbers: comma separated list of linenumbers where the warning would occur when not suppressed # # size : the filesize of the sourcefile, in bytes
Note: This is history. Turbolint is removed from Prolint release 74, because Turbolint was not compatible with Proparse.NET
Sometimes Prolint may raise a warning you don't agree with.
For example, rule "noundo" might warn that a specific temp-table is defined without NO-UNDO while you are certain that not using no-undo
is intentional.
In such cases you may want to suppress the Prolint warning.
There are two separate ways to suppress warnings:
Finally, if you really completely disagree with a rule, you can put it in the "skiprules" list. In that case Prolint will pretend the rule does not exist at all. The "skiprules" list is file "prolint/custom/rules/skiprules.lst". Its format is simple: each line contains one rule-id.
Let's begin with an example:
{&_proparse_ prolint-nowarn(noundo)} DEFINE TEMP-TABLE tt_mytable FIELD code AS CHAR FIELD desc AS CHAR INIT "<description>" INDEX idx_code AS PRIMARY UNIQUE code. |
When Prolint executes rule "noundo" it will simply skip the statement, the statement is invisible to the rule.
Prolint will still give a warning for rule "abbrevkwd" because INIT is an abbreviation for INITIAL, and a warning for
rule "strattrib" because "<description>" does not have any string attributes.
Prolint integrates with "ED for Windows" in three ways:
The first feature is configured in file prolint/settings/exteditor.cfg, see "settings".
The second feature requires proed4w, which is another free tool from global-shared.com. The following screen-shot shows proed4w in action:
You see a new toolbar-button (the white document with the red exclamation mark), when you press it the blue "Build results" pane will pop up and show
results from Prolint. This "Build results" pane can be used for navigating through the sourcefile, but you can also use the "previous error" and "next error" buttons.
Surf to "ProED4W" for download and general setup-instructions.
After you have installed proed4w as outlined in its general setup-instructions, you have to make one final setting in Prolint:
To enable validation, create a directory "prolint/custom/rtb-check-in" and then copy file "prolint/roundtable/version/prolint-rtb-check-in.ini" to "prolint/custom/rtb-check-in/default.ini".
The ini file contains several tuning options for the validation.
The validation will read the options in file "prolint/custom/rtb-check-in/default.ini".
Each rule is a non-persistent procedure located in directory prolint/rules. A rule will be invoked by prolint.p if it is listed in file prolint/rules/rules.d.
An easy way to insert a new record in this file, is to run dialog
prolint/core/dnewrule.w.
This dialog can be invoked from the Prolint Desktop window.
The file contains the following fields per record:
Important: if you are upgrading to Prolint 71 and use Roundtable integration, you MUST change rtb_evnts.p to avoid errors. The change only takes a minute and is described at page Repair your Roundtable Integration
New in this release is support for Roundtable 10.1b, created by Thomas Hansen.
The old directory "prolint/rtb" is gone and replaced by a new directory "prolint/roundtable/" + version-number.
Also new are a bunch of rules created by Glen West:
Filters let you modify or delete warnings.
Directory "prolint/filters" contains 4gl procedure files, each .p file in this directory is a filter.
Each time when any rule creates a warning, the warning will first go through each filter before it is published to each outputhandler.
A filter can modify the description or severity fields, or it can mark the warning as 'filtered' in which case the outputhandler will probably ignore the warning.
Each filter has the same API which makes it easy to add your own custom filters. You can use the filters/_template.pp file as a boilerplate for creating a new filter.
[procedure: prolint/core/lintcfg.w, invoked from anywhere]
This dialog helps you switch rules on/off, override default severities and select outputhandlers.
See "profiles" for a general discussion about profiles.
The combo-box contains a list of profiles found in directories "prolint/settings" and "local-prolint/settings", and it also contains a profile named "<none>" which is the default profile. The settings for "<none>" are stored in directory "prolint/settings", instead of in one of its subdirectories.
When you select a profile (using the combo-box), you will see a text next to the combo-box
indicating if this profile is a shared profile or a private profile. Shared profiles are found in "prolint/settings", private profiles are found in "local-prolint/settings".
Prolintdb consists of an outputhandler to write warnings to a database, and a couple of programs to help you query the database.
the user story:
Suppose you have a pretty large software project and want to inspect it with Prolint. It will take a long while for Prolint to finish the job,
so you would like to run Prolint unattended and look at the warnings later. Since it is a large software project Prolint will probably find
thousands of warnings, so you need tools to help you generate an overview.
Make sure the prolintdb database is connected with logical database name "prolintdb".
Run Prolint as usual, but select a profile that uses outputhandler "prolintdb.p". This outputhandler is responsible for writing warnings to the database.
When you do not want to write anything to the database, then just don't use outputhandler "prolintdb.p".
To query warnings that are stored in the prolint database, you can use the windows "Statistics by rule" and "Statistics by subdirectory".
These windows can be launched from the Prolint Desktop window.
Each time you want to check-in an object, or when you want to complete a task,
Prolint will validate the objects.
When Prolint finds errors (not just warnings) it will tell Roundtable to abort the operation.
Errors must be fixed before the object can be checked-in. This way you can enforce that objects conform to specific standards.
Not every Prolint warning is an error. You can define in much detail which Prolint warnings will be upgraded to errors.
These definitions can be different for each workspace, if you want.
When the object you want to check in is an includefile, Prolint will randomly select three objects that depend on this includefile and lint them instead. The number of includefiles (default 3) can also be configured.
Read more on setup and configuration.
When Prolint finds errors, it will show the following message box:
Prolint and Roundtable are integrated in several ways:
Notes:
Prolint is based on Proparse, the parser for Progress sourcecode created by Joanju.
Prolint release 74 does not work with Proparse.DLL anymore, instead it requires Proparse.NET.
You can download Proparse.NET from www.joanju.com/proparse.
Proparse.NET comes as a zipfile with three .NET assemblies in it.
Prolint is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
Prolint is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
A copy of the GNU Lesser General Public License is
run prolint/core/prolint.p(...) analyzes one or more sourcefiles, it is the entrypoint of all parsing.
Because prolint.p requires a couple of input parameters you will probably prefer to run a "wrapper"-procedure that first assigns those parameters and then passes them to prolint.p.