Archive
Code Readability
-
The code contains too many not aligned END instructions
For code readability purpose, developers should always align end keywords with the corresponding instruction. The END-xxx keywords should be aligned on the same column…
-
The code contains too many long PIC declaration pattern
While describing a PICTURE, once the length of a sequence exceeds 3 characters, use the factorized notation. Edition pictures (presence of Z) are not…
-
The code contains too many instructions that initialize zones of data with zeros or spaces
For code readability purpose, avoid initializations with 0 or spaces.
-
The code contains too many back performs
For readability purpose, avoid using perform with a paragraph higher in the code.
-
Optional property declarations should use ‘?’ syntax
In TypeScript there are several ways to declare an optional property, i.e. a property which might be missing from an object: adding “| undefined”…
-
Avoid explicit type when it can be inferred from literal value affected
For code readability purpose, if a property initializer is a scalar value or the return type can be clearly inferred from the body then…
-
Avoid binary operators with identical members
Using the same value on either side of a binary operator is almost always a mistake. In the case of logical operators, it is…
-
Increment (++) and decrement (–) operators should not be used in a method call or mixed with other operators in an expression
The use of increment and decrement operators in method calls or in combination with other arithmetic operators is not recommended
-
Avoid collapsible nested ‘if’
Merging collapsible if statements increases the code’s readability.
-
Avoid catches that only rethrow
catch clause that only rethrows the caught exception has the same effect as omitting the catch altogether and letting it bubble up automatically, but…