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!
When using the :: shortcut for hb:BUFFER-FIELD("language":U):BUFFER-VALUE, hb::language the ABBREVKWD rule complains that language is an abbreviated keyword for LANGUAGES.
DEFINE VARIABLE hb AS HANDLE NO-UNDO.
hb = TEMP-TABLE tt:DEFAULT-BUFFER-HANDLE.
hb:BUFFER-CREATE().
hb::language = "nl":U.
Fix:
Add to inspectnode prolint/rules/noundo.p:
WHEN "DATASETHANDLE":U THEN IF vartype='parameter':U THEN
/* suppress warning on "DEFINE .. parameter dataset-handle ..." */
ASSIGN havevar = FALSE.
If hard coded email is found in an include file, this rule shows the original procedure as source.
E.g. if I have procedure proc.p which is
/* proc.p body */
/* ... some code */
{inc.i}
/* ... some code */
hard coded email is in inc.i
Though proLint will show me that source is proc.p, not inc.i. The line will be the correct line in inc.i
Attached is a changed rule, which seems to work fine.
Yuri
Project goal: Quickly get Prolint working with Proparse.Net, so that Prolint can work with 10.2 syntax.
Required skills: ABL, and *either* .Net (C# preferred) or Java.
Project scope: Relatively small and certainly has a fixed scope. You will know when you are done...
In the query using the SkipNewShared it is used in the wrong way, resulting in wrong results when SkipNewShared is no.
The code:
tt_object.newshared <> SkipNewShared
should be changed to:
(not tt_object.newshared or not SkipNewShared)
A while ago we implented the StatementSkipList for rule do1.
I suggest we add BLOCK_LABEL to the default-list. Otherwise a DO without label is skipped, but one with label gives a warning.
run SetProlintProperty ("rules.do1.StatementSkipList", "CASE,DO,FOR,IF,REPEAT,BLOCK_LABEL").
Logwin8.w => save log as => tabfile.p gives an error about dynamic function ProlintProperty.
This is because Prolint does: RUN DecrementProlintPropertySubscribers. which tells propsuper to shutdown (if no-one is actively listening)
tabfile.p (responsible for the call) or Logwin8.w (responsible for the button)
should check if propsuper is running with a construction like in core/prolint.p
This was resolved on issue 1403, but the find "prototype" should be find FIRST "prototype" on line 394.
One could perhaps argue that "hide message" may never be necessary when you never use "message" in the first place, but I think a lot of "own implementations" of messages result in the progress-message to be used.
So I adjusted the rule to skip "hide message" (statehead=HIDE).
Niek
P.S.
In this rule IgnoreAb is also implemented in a way I think won't work or I don't understand.
I would like to run Prolint from our own application (not through desktop.w).
Actually, our application will start a new progress-session with propath and db's prepared and with a startup-procedure which runs Prolint.
What would be the best way to program the "wait-for close of logwin"? So I can quit the progress-session (without getting an editor).
Tried to get this to work and found some bugs.
Jurjen, can you please verify and checkin?
Perhaps complete the default appbuilder-function-list (_CONTROL-LOAD, _DEFAULT-DISABLE, _DEFAULT-ENABLE etc.) in ignoreab.p
Niek
I have made some adjustments to emptyblock.p so now it wil skip prototypes and externals, i.e.:
procedure setwinxx external "win.dll":
end procedure.
procedure ip_ResetBackGroundColor in super:
end procedure.
Most of the time we only deploy r-code to our customer-sites, but the programmers have always programmed:
run asobj/a5xxx.p
runnotfound will give a warning on this, although the r-code can be found most of the time.
I see in the code that function IsDlcComponent does replace the .p (or .w) with .r to do a new search, but then only returns true if the found r-code is in DLC.
Why can't it just return (rprogpath <> ?) ?
That's what matters doesn't it?
(then maybe the function-name should be modified)
I have made some minor adjustments to nameconv.p so it will now also send temp-table-names and "tt_procedure"-names to namecheck.p