Summary
Three related behaviors around bundled Starlark lint rules make a broken rule setup invisible:
- Stale rule files are skipped silently. A
.claude/lint-rules/ directory written by an older mxcli (v0.14-era init) loads only 4 of its 29 rules on v0.17.0/v0.18.0 (--list-rules shows CONV011-014 and nothing else from the bundle). No warning, no load error, nothing tells the user that 25 rules were dropped.
-r <unknown-rule> reports "No issues found". mxcli lint -p app.mpr -r CONV009 on a project where CONV009 failed to load prints No issues found. — indistinguishable from "rule ran and the project is clean". Expected: "unknown rule id CONV009" (it is not in the registry at that moment).
- Rule discovery is project-relative, while
init writes workspace-relative. With the layout workspace/.claude/lint-rules/ + workspace/project/app.mpr (created by running mxcli init from the workspace root against -p project/app.mpr), mxcli lint -p project/app.mpr does not load the rules; copying the same files to project/.claude/lint-rules/ loads all of them. So the place init puts the rules is not the place lint looks for them whenever the .mpr is not in the same directory as .claude/.
Environment
- mxcli v0.17.0 and v0.18.0 (both reproduce 1 and 2; 3 verified on v0.18.0), windows/amd64
- Mendix 11.12.2, MPR v2
Reproduction
# layout A (as created by mxcli init from a workspace root)
workspace/
.claude/lint-rules/*.star # 29 files
project/app.mpr
cd workspace
mxcli lint -p project/app.mpr --list-rules # bundle rules missing
mxcli lint -p project/app.mpr -r CONV009 # "No issues found." (rule never ran)
# layout B
cp .claude/lint-rules/*.star project/.claude/lint-rules/
mxcli lint -p project/app.mpr --list-rules # all rules present
mxcli lint -p project/app.mpr -m MyModule # CONV009 now fires (2 hits in our module)
The stale-file variant (1): keep rule files from an older release in the discovered location; on v0.18.0 only CONV011-014 of them register, silently.
Impact
We shipped a connector believing 29 convention/security rules guarded it; in reality 4 ran. The failure mode is the worst kind: everything looks green.
Suggestions
- Print a warning per rule file that fails to parse/register (or a summary: "3 rule files skipped, run with --debug for details").
- Make
-r with an unknown rule id an error.
- Either document that rule discovery is relative to the .mpr, or search both the .mpr directory and the working directory (the layout
init itself creates).
Summary
Three related behaviors around bundled Starlark lint rules make a broken rule setup invisible:
.claude/lint-rules/directory written by an older mxcli (v0.14-era init) loads only 4 of its 29 rules on v0.17.0/v0.18.0 (--list-rulesshows CONV011-014 and nothing else from the bundle). No warning, no load error, nothing tells the user that 25 rules were dropped.-r <unknown-rule>reports "No issues found".mxcli lint -p app.mpr -r CONV009on a project where CONV009 failed to load printsNo issues found.— indistinguishable from "rule ran and the project is clean". Expected: "unknown rule id CONV009" (it is not in the registry at that moment).initwrites workspace-relative. With the layoutworkspace/.claude/lint-rules/+workspace/project/app.mpr(created by runningmxcli initfrom the workspace root against-p project/app.mpr),mxcli lint -p project/app.mprdoes not load the rules; copying the same files toproject/.claude/lint-rules/loads all of them. So the placeinitputs the rules is not the placelintlooks for them whenever the .mpr is not in the same directory as.claude/.Environment
Reproduction
The stale-file variant (1): keep rule files from an older release in the discovered location; on v0.18.0 only CONV011-014 of them register, silently.
Impact
We shipped a connector believing 29 convention/security rules guarded it; in reality 4 ran. The failure mode is the worst kind: everything looks green.
Suggestions
-rwith an unknown rule id an error.inititself creates).