Are there projects that evaluate the RPG source? how is the software performance?

I just wanted to know if you know of some projects that might help decide if the Source being parsed is good code or bad RPG code.

I think about the terms Indicator Software , McCabe Cyclomatic Number and all those things.

I know these numbers are just a guess or two, but if you can provide your management with an estimate of the points, they will be happy and I can upgrade all those programs that otherwise work as stated but hurt to maintain.

so .. know any code analyzers for (ILE) RPGs?

+1


source to share


4 answers


We have developed a SourceMeter tool that can parse source code corresponding to RPG III and RPG IV versions (including a free form like Well). It provides you with the McCabe Cyclomatic Number and many other source code metrics that you can use to evaluate your RPG code.



+4


source


If the problem is that programs are agonizing to maintain, then the metric should reflect how much pain there is to maintain them, such as "time to implement a new X feature" versus "estimated time if the codebase was not a POS steam".



However, they are subjective (and always will be). IMO, you are probably better off refactoring ruthlessly to remove pain points from your development. You can take a look at striptease app techniques to create a more modern platform for delivering new features without having to rewrite Big Bang.

+1


source


The SD Source Code Search Engine (SCSE) is a tool for quickly finding a very large set of source codes, using the langauge structure, each file indexes the file according to code elements (identifiers, operators, constants, string literals, comments). The SD source code engine can be used with a wide variety of langauges like C, C ++, C #, Java ... and there is a draft RPG version.

In the OP's original question, the SCSE engine calculates various metrics across files as it indexes them, including SLOCs, comments, blank lines, and Halstead and Cyclomatic Complexity measures. Indicators are made available as an indexing stage byprooduct. Thus, various metrics for RPG can be obtained.

+1


source


I've never seen it, although I wrote a primitive analyzer for the RPG400. With the advent of freeform and sub-processes, it was too much time to change. I would like to have an API that will allow me to access the compiler's lexical tables.

If you want to try it yourself, consider reading the bottom of the compiler list and use line numbers to at least get an idea of ​​how long a variable lives. For example, a global variable is "worse" than a local variable. This can only be speculation due to GOTO and EXSR.

A lot of work.

0


source







All Articles