Implementation Smells
- Complex Conditional: a complex conditional statement
- Complex Method: a method with high cyclomatic complexity
- Duplicate Code: a code clone within a method
- Empty Catch Block: a catch block of an exception is empty
- Long Identifier: an identifier with excessive length
- Long Method: a method is excessively long
- Long Parameter List: a method has long parameter list
- Long Statement: an excessive long statement
- Magic Number: an unexplained number is used in an
expression - Missing Default: a switch statement does not contain a
default case - Virtual Method Call from Constructor: a constructor calls a
virtual method.
SOURCE: https://www.tusharma.in/smells/IMPL.html
Cyclomatic complexity:
It is a measure of number of linearly independent paths in it. It is a software metric used to indicate the complexity of a program. A control flow graph can used to determine it with a formula.
==cyclomatic complexity = E-N+2P ==
E = number of edges in the flow graph.
N = number of nodes in the flow graph.
P = number of nodes that have exit points
SOURCE: https://www.geeksforgeeks.org/cyclomatic-complexity/