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!


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


core/Prolint.p gives error on get-row()

When compilation "fails" with for example error 468, the compiler:error-status is set, error-status:num-messages is set, error-status:get-number(1) works but compiler:get-row(1) gives an error 4065 as if the call to the method is wrong?!?

Solution: Prolint.p should also skip compiler:error-number 468 (where it skips 4345 and 6430)

P.S. Logged a bug with Progress.


No RETURN in function

Is there a rule to determine when you have a function with no RETURN statement?


Configurable uninproc

I run into the problem that rule uninproc tagged a lot of procedures in "library"-super-procedures.
It turned out the super-procedure had some "public" procedures and they where calling "private" procedures.
But since uninproc can not detect the usage of the "public" procedures it tagged them as not used an that caused the "private" to be also tagged as not used.
I thought this was kind of overkill so I created a configurable property TagDeadParents for rule uninproc which will do (as described in the properties.p):


Any issues with Prolint and Windows 2000?

We run XP on 99% of our boxes with no issues. But we have one Win2k box that gets the following error when we try to lint a file:

"END CASE has no corresponding CASE statement." (5387)
c:\p4gl\tools\prolint\core\lintsuper.p could not understand line 153.

The code looks like it's correct.


New contributed rule fortranoper

A rule which checks for Fortran-style operators.
Downloadable from the svn repository contrib/rules.

http://websvn.oehive.org/listing.php?repname=prolint&path=%2Ftrunk%2Fcon...


fortranoper

Rule fortranoper searches for the use of Fortran-style operators like:
EQ, GT, LT, GE, LE, NE (for =, >, <, >=, <=, <>).

I know some people may like this or are used to this, but others don't.


UltraEdit as external editor

The default installation folder for UltraEdit has changed (some while now).
Can exteditor.cfg please also include this?
"C:\Program Files\IDM Computer Solutions\UltraEdit-32\uedit32.exe"


#
Syndicate content