Skip to content

Checks reference

Every check plc-st-review ships with, what it catches, why it exists, how to configure it, an ST trigger, what the bot posts, and a suggested fix. See check-limitations.md for what each check deliberately doesn't catch.

Live demo: every check in this document fires at least once on PR #1, where you can see the exact inline comments the bot posts.

Common settings (apply to every check)

Two knobs work on every check, set in .plc-st-review.yml:

severity_overrides:
  CATEGORY_NAME: error      # raise / lower the severity for this category
disabled_checks:
  - CATEGORY_NAME           # turn the check off entirely

Each per-check page below only lists additional knobs (check-specific config, prefix lists, etc.).

Diff-based checks

These compare the before and after trees of a PR. Every finding implies a change happened in this PR.

Static integrity checks

These run on the after tree alone and surface bugs that compile but mis-behave. Each one filters out findings already present in the before tree so the check only flags new problems introduced in the PR.

FB-instance checks

These target standard IEC 61131-3 function-block patterns (TON, CTU, R_TRIG, SR/RS, etc.), wiring mistakes that won't trip a normal compiler but produce wrong runtime behavior.

Code-quality and style checks

These are stylistic / hygiene checks. Most ship at info severity and stay off your blocking gate by default; raise them in .plc-st-review.yml once your team agrees on a convention.

Using a check in your PR

plc-st-review runs automatically once you've set up the GitLab or GitHub integration (see gitlab-setup.md / github-setup.md). Every check above lands as either an inline comment on the relevant .st line or as part of the summary issue / discussion comment when the affected line falls outside the PR's diff hunks.

To suppress a check for a single repo, add it to disabled_checks in .plc-st-review.yml. To raise or lower its severity, use severity_overrides. See tuning-severities.md for the tuning ramp.

To compose policy across many repos, naming conventions, severity profiles, forbidden symbols, use extends: to pull from shared preset files. See preset-packs.md.