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 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!


Varusage.SkipNewShared not implemented correctly

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)


do1.StatementSkipList

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").


Check if propsuper is running

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


rule tablename false positives when forward function decl. <> function decl

This was resolved on issue 1403, but the find "prototype" should be find FIRST "prototype" on line 394.


rule message gives warning on hide message

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.


wait-for close of logwin

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).


Ignore AB-stuff

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


emptyblock skips prototypes and external

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.


runnotfound

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)


nameconv for temp-table-names, procedure-names, function-names

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


namecheck

Don't know if anyone uses the default namecheck.p, but there is an error in the code.
CASE btt_Object.ObjType
should be CASE btt_Object.ParamType
So INPUT, OUTPUT and INPUT-OUTPUT paramters will have to have i, o and io as prefix.


forwardparams

parameters in function don't match with forward declaration

Rule "forwardparams" gives this warning when it finds that a function implementation has different parameters than its forward declaration.
For example:

function myfunction returns logical(input something as character) forward.

function myfunction returns logical:
    if something>"" then 
       return true.
    else 
       return false.
end function.

Why


ABL User Defined DataTypes

When running the joanju_testrun we get the following error with regards to user defined data types:

BLUtilities.cls:36:3: unexpected token: GET

Code Example:

DEFINE PUBLIC PROPERTY EnumOrderStatus AS common.EnumOrderStatus
GET:
RETURN objEnumOrderStatus.
END GET.

Is this supported?

Thanks in advance.


Prolint during migration/refactoring

At our company we have a lot of sources and a certain release/update-procedure.
We are starting to use Prolint to check the sources that are checked-into the versioning system.
But it wasn't desirable to check all sources against the same profile.
For instance when someone checked out an existing source (created for a certain release), during check-in the modified source would only be checked against 5 rules, while when someone created an entirely new source it would have to comply to 20 rules.


Resizable logwin8.w

Subject says it all I think.
You can resize the window, which will resize the browse accordingly and you can resize the columns better because of fitt-last-column.

Niek


#
Syndicate content