Hi, I'm trying to write some custom code rule :
- IF-statement containing multiple conditions or 'NOT' must be between round brackets and maximum 4 conditions may be given
for instance CORRECT
IF ( WS-VELD-1 = '1'
OR (WS-VELD-2 = '1' OR '2'))
IF (NOT WS-VELD-1 = '1')
- when using CALL 'CANCEL' or CALL 'PXXXZRC', it should always be preceded by a DISPLAY statement
- a working storage field which has 88-levels must always begin with SW-... and the 88 level names must contain this name
for instance :
03 SW-END-FILE PIC X(1).
88 END-FILE-YES VALUE '1'.
88 END-FILE-NO VALUE '0'.
- and such SW- field must always be manipulated by using SET statement instead of MOVE
SET END-FILE-YES TO TRUE
- unused fields : identification of working storage fields that aren't used in the procedure division
- constants :
- the field name must always begin with CS-
- in IF statement never use : IF (AMOUNT > 1000) but use a constant field : IF (AMOUNT > CS-MAX-AMOUNT)
I've already done a simple code rule, but didn't find how to check these cases.