SA0164: Multiline comments

Detects multiline comments that are coded as (* comment *). Only single-line comments that are coded as // comment are permitted.

Justification: Some programming guidelines prohibit multiline comments in code because the beginning and end of a comment could get lost and the closing comment bracket could be deleted by accident.

TIP:

You can deactivate this check by means of the pragma analysis, also for comments in the declaration part.

Importance: Low

PLCopen rule: C5

Example

{attribute 'do-analysis'}
(*
        This is a multi-line comment                            // SA0164
*)
PROGRAM PLC_PRG
VAR
// This is a single line comment
        a: DINT;
END_VAR

(* This is not a single line comment *)          // SA0164
a := a + 1;