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!


nopprsininclude rule

The nopprsininclude is reporting things in my code.

Help on this Rule gets me a blank page.

Could we have an explanation of this one please. Always keen to learn new things!


false positive by rule "tablename"?

The tablename rule excludes the fields in the except/using option of the buffer-compare statement. Is there a valid reason this rule has to fire for fields in the except/using phrase of buffer-compare statements or is this a false positive?

The following statement gives a rule violation on the custnum and name field.

BUFFER-COMPARE sports.customer EXCEPT custnum name TO tCust SAVE RESULT IN lCompare.


Buffer handle parse error

/* Sample code, parsed with errors */
DEFINE VARIABLE hCustomer AS HANDLE NO-UNDO.
DEFINE VARIABLE hQry AS HANDLE NO-UNDO.

CREATE QUERY hQry.
hQry:ADD-BUFFER(BUFFER customer:HANDLE). /* parsing error: Expecting RIGHTPAREN, found : */
hQry:QUERY-PREPARE("For each customer no-lock":U).
hQry:QUERY-OPEN.
hQry:GET-FIRST.

/* Sample code, parsed with NO errors */

DEFINE VARIABLE hCustomer AS HANDLE NO-UNDO.
DEFINE VARIABLE hQry AS HANDLE NO-UNDO.

CREATE QUERY hQry.
hCustomer = BUFFER customer:HANDLE.
hQry:ADD-BUFFER(hCustomer). /* no parsing error */


Error "r:\xxxxx\yyyy" is a directory (463)

Source code is in r:\xxxxx\yyyy

This error occurs when trying to prolint a file from AppBuilder 9.1E. The run completes and gives results.

It appears when testing rule "nonestinc".

Stack trace shows:
AbFindSections prolint/filters/ignoreab.p

This error has only occurred since the update to Prolint72 and new proparse.

Any ideas?


Prolint release 72 is available

This release is mainly a bugfix release. There are no bug reports left in the issue tracker anymore!

There is one new rule: andorparens looks at boolean expressions with a mix of AND and OR operators and will suggest you to use parentheses. This rule is inspired by a recent thread on PSDN, where people got in trouble because the compiler picked a different evaluation precendence than expected. With parentheses this would not have happened.

As always, download your latest copy from http://www.oehive.org/prolint/download

Bye,
Jurjen.


andorparens

use parentheses when mixing AND and OR

Prolint rule "andorparens" raises this warning when it finds a mix of OR and AND without parentheses.


Sharelock rule

Hi,

Whilst using Prolint the sharelock rule is causing an error due to this line of code -

COPY-LOB FROM gmResponse STARTING AT iStartByte FOR (iEndByte - iStartByte) TO mBinaryFile.

We are using this rule as an error when checking in code in Roundtable(10.1.b03). I've changed the ini file to get around it and I suspect this use of "FOR" won't be widely used but just wondered if anyone else had encountered this.

Thanks,

Matt


Error 11678

Has anybody seen this error:
REPLACE/CONCAT may not result in data > 32000 bytes. (11678)

while running Prolint?

I'm running it against code that hasn't been Prolinted in the past, and this has come up for several of the compile units so far. (Still running)

Is there a way to get a stack trace when this kind of error happens? Seems like OE ought to tell me which line of code the error happened at.


Check use of parentheses with multiple logical operators in a where clause

There has been a report on PSDN at http://www.psdn.com/library/thread.jspa?threadID=8706&tstart=0 that some versions of 10.1B have a problem with not following the correct precedence of multiple logical operators in a where clause. It seems to me that people are not as clear about the precedence of logical operators as they are of arithmetic operators and so one should always use parentheses to make sure that the intent is clear when there is a mixture of AND and OR


false positive by rule "tablename"

when an on X trigger is inside two different internal procedures the rule tablename will give an invalid result.


Prolint release 71 is available

At last! This release is way overdue because it contains rules that were submitted by Glen West months ago.

Big news: Prolint integrates with Roundtable 10.1b !! Thomas Hansen adapted the existing integration for Roundtable 9.1a-c and now it works for Roundtable 10.1b.

A little bit unfortunate for existing users, who upgrade to Prolint 71 and were already using the Roundtable integration, is that they need to update their "rtb_evnts.p" procedure. It is simple: just follow the instructions on page Repair your Roundtable Integration.


Upgrading to Prolint 71: repair Roundtable integration

When you upgrade to Prolint 71 from an older Prolint release and you were already using the Roundtable integration, then you will experience errors until you make the following fix:

Locate in your Roundtable directory the compiled file "rtb_evnt.r" and delete it.

Locate in your Roundtable directory the sourcefile "rtb_evnt.p" and open it in your editor.
Find the line where prolint/rtb/custom_evnt.i is included:

   {prolint/rtb/custom_evnt.i}

and change it to

   {prolint/roundtable/91c/custom_evnt.i}

Optionally compile+save rtb_evnt.p.


nameconv.p

I'm working my way through call resolution for Prolint, and found something that looks like dead code.

It looks like procedure ProcessFieldRUsage in nameconv.p is just a copy/paste from varusage.p. I think it's unused and should be removed. It has a call to AddDetectedUsage, which is only defined in varusage.p (which doesn't appear to be a super of anything)... so that call would fail if it was ever executed.


Unix download for Prolint

I noticed that the download page for Prolint wasn't very unix friendly - the only options were the Windows .exe installers.

I added some notes, with a URL, for fetching a release 'tarball' using the WebSVN UI. It's surprisingly slick! Worked great for me on my Linux machine.


Local BUFFER xxxx is not used (false positive).

Following code in GO trigger:

DEFINE BUFFER buf-dossier-path FOR dossier-path.
DEFINE BUFFER buf-combinations FOR combinations.

IF g-asp THEN DO:
CREATE QUERY qh.
qh:SET-BUFFERS(BUFFER buf-dossier-path:HANDLE, BUFFER buf-combinations:HANDLE).
END.

Gives "Local BUFFER buf-dossier-path is not used." and "Local BUFFER buf-combinations is not used."


#
Syndicate content