Skip to content

docs(lint): correct field value formats in write-lint-rules skill - #1128

Draft
jvegmond-tech wants to merge 1 commit into
mendixlabs:mainfrom
jvegmond-tech:docs/lint-field-formats
Draft

jvegmond-tech wants to merge 1 commit into
mendixlabs:mainfrom
jvegmond-tech:docs/lint-field-formats

Conversation

@jvegmond-tech

Copy link
Copy Markdown

The reference documented three values that do not match what the runtime returns. Each mismatch makes a rule match nothing and report a clean pass, which is indistinguishable from the project being healthy.

  • entity_type is normalised to Persistent/NonPersistent/View in LintContext.Entities (context.go CASE), not lower case. The SEC001 example rule in this document used "persistent" and so matched no entity at all.
  • permission.access_type is written upper case by builder_permissions.go (CREATE/READ/WRITE/DELETE/EXECUTE/VIEW/ACCESS/MEMBER_READ/MEMBER_WRITE).
  • permission.module_role_name is qualified (Sales.Admin), which matters because rules compare it against user_role.module_roles.

Verified in the mxcli dev container: - make build — passes - go test ./mdl/linter/... — passes (mdl/linter and mdl/linter/rules)

The reference documented three values that do not match what the runtime
returns. Each mismatch makes a rule match nothing and report a clean pass,
which is indistinguishable from the project being healthy.

- entity_type is normalised to Persistent/NonPersistent/View in
  LintContext.Entities (context.go CASE), not lower case. The SEC001
  example rule in this document used "persistent" and so matched no
  entity at all.
- permission.access_type is written upper case by builder_permissions.go
  (CREATE/READ/WRITE/DELETE/EXECUTE/VIEW/ACCESS/MEMBER_READ/MEMBER_WRITE).
- permission.module_role_name is qualified (Sales.Admin), which matters
  because rules compare it against user_role.module_roles.
@github-actions

Copy link
Copy Markdown

AI Code Review

Critical Issues

  • None found

Moderate Issues

  • None found

Minor Issues

  • None found

What Looks Good

  • The PR correctly updates documentation to match actual runtime behavior for three field values:
    1. entity_type values changed from lowercase ("persistent", "NonPersistent", "view") to normalized casing ("Persistent", "NonPersistent", "View")
    2. permission.access_type values changed from lowercase to uppercase ("CREATE", "READ", etc.)
    3. permission.module_role_name changed from unqualified ("Admin") to qualified ("Sales.Admin") format
  • Changes are minimal and focused solely on correcting inaccurate documentation
  • Verified in dev container that builds and tests pass
  • Documentation now accurately reflects what lint rule writers will actually encounter in the LintContext

Recommendation
Approve. The documentation corrections are necessary for users to write effective lint rules, and the changes are precise and verified. No code changes were made, only documentation updates that align with actual runtime behavior.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants