Better than code reviews
bbalk 1200006543 Visits (2460)
Code reviews were once common practice, but at some companies they have been reduced or even eliminated entirely. Often this has been done in the name of cost savings even though the earlier a bug is found in the application life cycle, the less it costs.
Also, if you are still conducting code reviews, your coworkers are probably not perfect: they can miss some errors and can overlook violations of your coding standards .
Fortunately, the Enterprise PL/I compiler can help you with the latter:
You can change the defaults for the RULES compiler option to detect a wide variety of poor coding practices.
Declaring all variables is usually required in all professional code, but by default, the compiler issues only an information message for undeclared variables (which means the compilation, if it had no other problems, would end with a return code of 0).
However, under the RULES(NOLAXDCL) option, the compiler will flag all undeclared variables with an error message that would cause the compile to end with a return code of 8 at least.
There are many other suboptions to the RULES option, and their default setting is to cause the compiler to behave as the old OS PL/I and PL/I for MVS compilers did. But your code quality would be guaranteed to be better if you changed some of these defaults to match your coding standards.
Please examine these suboptions and turn on those (such as NOLAXDCL) that will help you.
And if you have a coding standard that these suboptions do not check, please submit a requirement for it so that we can add it in a future release.