Tool to analyse code - Use of case for Linux / Unix

Posted by christian.bryan@capita.co.uk on 23-Jul-2018 08:53

Hi All 

Are there any tools out there to go through a code set and convert the use of RUN statements to call .p's and .w's as lowercase.

We are looking to move to an appserver / pas environment and would like to offer the solution in Linux but we have mixed case in our naming conventions and what is on disk in terms of .r, which obviously is not an issue in Windows.

Anyone been through a similar process?

Thanks

All Replies

Posted by James Palmer on 23-Jul-2018 09:00

Sounds like a good use case for ProParse. The learning curve is steep, but it’s worthwhile.

We maintain a fork of the original to keep it as up to date as possible with new releases of Progress.

github.com/.../proparse

Posted by Mike Fechner on 23-Jul-2018 09:10

Check out the OpenEdge plugin for Sonar Cube from Riverside

http://riverside-software.fr

Sent from Nine

Von: "christian.bryan@capita.co.uk" <bounce-christianbryancapitacouk@community.progress.com>
Gesendet: Montag, 23. Juli 2018 15:55
An: TU.OE.Development@community.progress.com
Betreff: [Technical Users - OE Development] Tool to analyse code - Use of case for Linux / Unix

Update from Progress Community
christian.bryan@capita.co.uk

Hi All 

Are there any tools out there to go through a code set and convert the use of RUN statements to call .p's and .w's as lowercase.

We are looking to move to an appserver / pas environment and would like to offer the solution in Linux but we have mixed case in our naming conventions and what is on disk in terms of .r, which obviously is not an issue in Windows.

Anyone been through a similar process?

Thanks

View online

 

You received this notification because you subscribed to the forum.  To stop receiving updates from only this thread, go here.

Flag this post as spam/abuse.

Posted by cverbiest on 25-Jul-2018 02:42

We went through a major refactoring of our code, from using non-standard extensions with all directories in the propath, to using standard extenstions and and short propath.

/* before refactoring */
{ vars.t }

run main-l persistent.

/* after refactoring */
{ cceinc/vars.i }

run ccetools/main-l.p persistent.

The procedure to refactor the code uses the proparse tokenlister, Our actual procedure is very specific for our environment but I posted a sample procedure on oehive. (can't find it a the moment).

I'll try to locate the sample

Posted by cverbiest on 25-Jul-2018 03:04

found it, the sample will parse an abl source and replace includes without directory

/* before */
{ someinclude.i }

/* after */
{ directory/someinclude.i }

In our real process I added a rename table containing

  • oldsource: original source name
  • oldrun: original run
  • newsource new sources name (in case you want to rename the source)
  • newrun new run

The refactoring is done in 3 steps

  • initial scan to fill the rename table
  • check rename table, update for non-standard rename
  • actual refactor run

[View:/cfs-file/__key/communityserver-discussions-components-files/19/includepath.p:320:240]

This thread is closed