Chapter 2. Coding Standards

Table of Contents

Ada Rule Set
Backward goto
No Abort
No final else
Use of goto
Exit Label
Exit when
Loop name
No Delay
'when others' in exception handler
Parameter order
Multiple exits
Multiple Exit in loop
C-Style Rule Set
Use of continue
Multiple break
Multiple exits
No Compound statement
Label out a switch
Missing Break
No final else
Missing Default
No case in switch
Fallthrough
Assignment in Boolean
Assignment without Comparison
Use of goto
Backward goto
Code before first case
Risky Empty Statement
COBOL Rule Set
Column 7 for * and D Only
Code in Uppercase
Empty line after EXIT
Empty lines around DIVISION
Empty line after SECTION
COMPUTE instead of ADD
COMPUTE instead of SUBSTRACT
No Conditional GOTO
Perform with no THRU
Missing END-IF
Missing END-EVALUATE
Variable declaration format
No Backward Goto
Single GOBACK
No procedural COPY
No RENAMES
No Homonymous
No more than 3 nested IF
No ALTER
No MOVE CORRESPONDING
Use COMP for OCCURS
Use SYNCHRONIZED
Open file once
Close file once
No DEBUG MODE
No Variables S9(9)
BLOCK Clause
Use WHEN OTHER
No INITIALIZE
Close open file
Use FILE STATUS
READ-WRITE Instruction
Standard Label
COBOL CICS Rule Set
No SORT under
No RELEASE under CICS
No RETURN under CICS
No MERGE under CICS
No FILE CONTROL under CICS
No FILE SECTION under CICS
No USE under CICS
No ACCEPT under CICS
No CLOSE under CICS
No DELETE under CICS
No DISPLAY CONSOLE under CICS
No DISPLAY SYSPUNCH under CICS
No OPEN under CICS
No READ under CICS
No RERUN under CICS
No REWRITE under CICS
No START under CICS
No STOP under CICS
No WRITE under CICS
Use CALL
Single ENTRY
No INPUT-OUTPUT under CICS
No I-O CONTROL under CICS
No FD under CICS
No SD under CICS

The following sections describe the coding standards available for Rule Checking in Squore according to the related programming language or environment. C-Style applies to C, C++, C# and Java unless stated.