Archive
Software Resiliency
-
The code contains too many paragraph labels not followed by a dot
As much as possible, developers should always terminate paragraph labels with a dot.
-
The code contains too many data contigus levels
When creating a new data level, do not add 1 to the previous level. Having not contigus level is easier for inserting an intermediate…
-
The code contains too many dangerous usage patterns in file management
Avoid dangerous file usage patterns. File management contains dangerous usage patterns.
-
The code contains paragraphs having the same name
Paragraphs having the same name is ambigous, and should be strongly avoided.
-
The code contains too many bad area A usages
In a cobol file, area A (the first four columns) are reserved for divions, sections names, paragraph names and level 01 data declaration.
-
Errors should not be created without being thrown
Creating a new Error without actually throwing it is useless and is probably due to a mistake.
-
Avoid structures initializations with unamed fields
You should almost always specify field names when initializing structs. This is now enforced by go vet.
-
Avoid self-assigned variables
There is no reason to re-assign a variable to itself. Either this statement is redundant and should be removed, or the re-assignment is a…
-
Avoid ‘if/else if’ & cases statements having the same condition
A chain of if/else if statements is evaluated from top to bottom. At most, only one branch will be executed: the first one with…
-
Avoid dead code
Dead code are instructions that can never be reached. Obvious dead code are instructions that follow unconditional jumps in the same statement block. Dead…