Rules / double-semicolon
Double semicolon ;; in Structured Text: is it an error
An extra `;` creates an empty statement. It does nothing and does not break the program, but it often marks a hasty edit, and the logic around it is worth a second look.
Severity: Minor
Rule id: double-semicolon
Double ;; (empty statement)
What the rule checks
A stray empty statement ;; is harmless, but a trace of a sloppy edit.
What it does to the plant
Harmless by itself. Useful as a marker of a place that was edited in a hurry.
Example
Bad: the rule fires
PROGRAM PumpCtrlVAR xRun : BOOL; xPump : BOOL;END_VARxPump := xRun;;
Fixed: the rule is silent
PROGRAM PumpCtrlVAR xRun : BOOL; xPump : BOOL;END_VARxPump := xRun;
Both listings are run through the linter by an automated test: the rule fires on the first and stays silent on the second.
How to fix
- Remove the extra
;.
Check your project
Upload a PLCopen XML or CODESYS .export file: the report is free and the code is not stored.
Local version on GitHub →
The same linter without uploading a file: command line and GitHub Action.
Related rules
Assignment of a variable to itself · self-assignmentEmpty IF/loop branch · empty-branchPOU without a single comment · missing-comments
2026-11-26