Release Gate Checker
Anyone who has ever pushed a release with a leftover "TODO", a copyright line pasted from the wrong template, or a version string that does not match the format the target actually expects knows the naive fix does not scale: a mental checklist gets forgotten under deadline pressure, and a code comment that says "remember to check X" is not actually checked by anything. This library turns each of those checks into a function that returns a genuine pass/fail plus a human-readable detail string, collects them into a fixed-capacity checklist object, and exposes one summary call that answers "is this release actually clean" as a fact, not an opinion. The source-file scanner reads a plain text file from the MQL4\Files sandbox and checks it for a caller-supplied list of required tokens (things that must be present, such as "#property strict") and forbidden tokens (things that must be absent, such as "#import" or a stray "TODO"), appending one checklist item per token so a failure points at exactly which token tripped it rather than a single opaque "file failed" result. The demo writes two synthetic source samples into the sandbox - one clean, one deliberately broken with a wrong copyright line, a missing strict property, a leftover TODO and a forbidden #import - and runs the identical checklist against both, so the pass and fail paths are both visible from a single script run rather than having to trust that the fail path was ever actually exercised. Notes and limitations - ReleaseGateReadSandboxFile can only read files inside MQL4\Files (or MQL4\Files\ (or MQL5\Files\ on the native MQL5 build)Common with a sandbox-aware variant of the open call) - MQL4 file I/O cannot read the actual .mq4 source file sitting in MQL4\Scripts or MQL4\Include. Checking a real source file means copying its text into the sandbox first (a manual step, or driven by an external build script) rather than pointing this library at the live source tree directly. - The token scanner is a plain substring search, not a tokeniser or parser - a forbidden token that happens to appear inside a string literal or a comment will still be flagged, and a required token split across two lines by an unusual line wrap will be missed. This is intentional: it is meant to catch the common, careless case cheaply, not to replace a real static analyser. - ReleaseGateCheckSemanticVersion only accepts the plain "N.NN" shape this catalogue uses; it will reject a three-part version like "1.0.0" or a "v"-prefixed string by design. - The checklist has a fixed capacity of 100 items (RELEASE_GATE_MAX_CHECKS); ReleaseGateChecklistAdd returns false once full rather than overflowing. - No trading functions are used anywhere in this library.
Script · MT5 · v1.0 · Free
About Release Gate Checker
Release Gate Checker is a script for MetaTrader 5. It has 2 settings, such as Good sample file and Bad sample file. MQL source code included.
Files in the download: ReleaseGateChecker.mq5.mqh, ReleaseGateChecker.txt, ReleaseGateCheckerDemo.ex5, ReleaseGateCheckerDemo.mq5.
Settings
| Setting | Default | What it does |
|---|---|---|
| Good sample file | ReleaseGateChecker_good.txt | sandbox filename for the clean sample |
| Bad sample file | ReleaseGateChecker_bad.txt | sandbox filename for the broken sample |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: MT5 Script · MQL5 Source Code