Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Built-in Rules

mxcli ships with built-in rules implemented in Go. These rules are fast and always available.

The lint rules below run with mxcli lint. There is also a separate group of check-time rules that run with mxcli check — see Check-time Rules at the bottom of this page.

MDL Rules

RuleDescription
MDL001Naming conventions – Checks entity, attribute, and microflow naming patterns
MDL002Empty microflows – Detects microflows with no activities
MDL003Domain model size – Warns when a module has too many entities
MDL004Validation feedback – Checks for proper validation feedback usage
MDL005Image source – Validates image widget source configuration
MDL006Empty containers – Detects container widgets with no children
MDL007Page navigation security – Checks that pages called from microflows have appropriate access rules

Security Rules

RuleDescription
SEC001Entity access rules – Ensures persistent entities have access rules defined
SEC002Password policy – Checks for secure password configuration
SEC003Demo users – Warns about demo users in production security level

Convention Rules

RuleDescription
CONV011No commit in loop – Detects COMMIT statements inside LOOP blocks (performance anti-pattern)
CONV012Exclusive split captions – Checks that decision branches have meaningful captions
CONV013Error handling on external calls – Ensures external service calls have error handling
CONV014No continue error handling – Warns against using CONTINUE error handling without logging

Running Built-in Rules

Built-in rules run automatically with mxcli lint:

# Run all rules (built-in + Starlark)
mxcli lint -p app.mpr

# List all rules to see which are built-in
mxcli lint -p app.mpr --list-rules

Excluding Modules

System and marketplace modules often trigger false positives. Exclude them:

mxcli lint -p app.mpr --exclude System --exclude Administration

Check-time Rules (mxcli check)

These rules run with mxcli check (and the LSP, for real-time diagnostics) rather than mxcli lint. They focus on pluggable-widget authoring.

RuleWhere it firesDescription
MDL-WIDGET01mxcli check + LSPUnknown property key on a pluggable widget. The property is not in the widget’s .def.json. Catches typos like optionsSourcType (missing e) before MxBuild does. Suggests the nearest known key.
MDL-WIDGET02mxcli check --post-migrationLegacy native widget found on a project that has a pluggable replacement available. Reports each occurrence with the qualified document name, widget instance name, and the recommended pluggable widget.

Run mxcli check --help for usage. See Error Messages → MDL-WIDGET01 / MDL-WIDGET02 for cause-and-solution detail.