free quality report for PLCopenXML exports

Rules / missing-implicit-checks

No POUs for Implicit Checks in a CODESYS project: what it changes

CheckBounds, CheckDiv..., CheckRange... and CheckPointer are added to a project by hand. Without them the runtime does not intercept out-of-bounds access, division by zero or out-of-range values.

Severity: Warning Rule id: missing-implicit-checks No POUs for implicit checks (runtime guards)

What the rule checks

The project has no implicit check functions (CheckBounds, CheckDivReal, CheckRange…, CheckPointer). They are added manually; without them the runtime does NOT intercept array-bounds overruns, division by zero and the like. Instead of graceful handling you get an exception or memory corruption.

What it does to the plant

Instead of a soft fallback you get an exception that stops the task, or silent memory corruption.

Example

Bad: the rule fires
<pou name="PLC_PRG" pouType="program">  <interface/>  <body><ST><xhtml xmlns="http://www.w3.org/1999/xhtml">;</xhtml></ST></body></pou>
Fixed: the rule is silent
<pou name="PLC_PRG" pouType="program">  <interface/>  <body><ST><xhtml xmlns="http://www.w3.org/1999/xhtml">;</xhtml></ST></body></pou><pou name="CheckDivReal" pouType="function">  <interface>    <returnType><REAL/></returnType>    <inputVars><variable name="divisor"><type><REAL/></type></variable></inputVars>  </interface>  <body>    <ST><xhtml xmlns="http://www.w3.org/1999/xhtml">IF divisor = 0 THEN  CheckDivReal := 1;ELSE  CheckDivReal := divisor;END_IF</xhtml></ST>    <addData><data name="cf"><CheckFunction>CheckDivReal32</CheckFunction></data></addData>  </body></pou>

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

  1. Add the object: in CODESYS right-click Application → Add Object → POUs for Implicit Checks, tick the ones you need (Bounds, Division, Range, Pointer).
  2. Make sure the implementation is not empty: the default stubs protect, an empty body does not.
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

In-depth article

2026-11-26

Processing happens in memory, and the uploaded code is not stored. The tool advises; code changes are up to the engineer (see what the linter can't see). What happens to your code → · Rule reference · Your code & privacy · Industry benchmark · Feedback · GitHub