Detects lines of code that have a semicolon (;
) but not a statement
Justification: An empty statement can be a sign for missing code.
Note: There are good reasons for using empty statements. For example, in a CASE statement it can make sense to explicitly program out all cases, even those where there is nothing to do. When this kind of empty CASE statement contains a comment, Static Analysis does not generate an error message.
Importance: Low
Examples
CASE value OF 1:DoSomething(); 2:; 3:DoSomethingElse(); END_CASE --> SA0003: Empty statements
CASE value OF 1:DoSomething(); 2:; //nothing to do 3:DoSomethingElse(); END_CASE --> No SA error