Skip to content

fix(tests): scope migration-self-contained lint example to flat migrations/*.mo#599

Merged
Kamirus merged 1 commit into
mainfrom
fix/migration-self-contained-lint-glob
Jun 26, 2026
Merged

fix(tests): scope migration-self-contained lint example to flat migrations/*.mo#599
Kamirus merged 1 commit into
mainfrom
fix/migration-self-contained-lint-glob

Conversation

@Kamirus

@Kamirus Kamirus commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #594.

The migration-self-contained example rule used **/migrations/** for both lintoko includes and [lint.extra], which could match any migrations directory anywhere in the tree and recurse into subfolders. Projects using enhanced migrations keep a flat migrations/*.mo chain (as configured via chain = "migrations" in mops.toml), so the example should mirror that layout.

Before

# migration-self-contained.toml
includes = ["**/migrations/**"]

# mops.toml
[lint.extra]
"migrations/**" = ["lint/migration-self-contained"]

After

# migration-self-contained.toml
includes = ["migrations/*.mo"]

# mops.toml
[lint.extra]
"migrations/*.mo" = ["lint/migration-self-contained"]

If your chain path differs (e.g. backend/migrations), set both includes and [lint.extra] to that path with /*.mo.

What is unchanged

No CLI behavior change — only the lint-extra-example-rules test fixture. No CHANGELOG entry.

Made with Cursor

…tions/*.mo

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Cursor AI review

👍 APPROVE — looks safe to merge

Category Assessment Details
Summary Narrows the migration-self-contained lint example fixture from broad **/migrations/** / migrations/** globs to flat migrations/*.mo, matching enhanced-migration layout. No CLI or runtime behavior change.
Code Quality Minimal, focused diff; aligns the two glob sites (includes and [lint.extra]) that must stay in sync.
Consistency Matches existing docs examples in docs/docs/cli/4-dev/07-mops-lint.md and docs/docs/09-mops.toml.md, which already use migrations/*.mo.
Security Test-fixture-only change; no auth, integrity, or secrets surface touched.
Tests Fixture still targets migrations/20250101_000000_Init.mo; snapshot expectations unchanged and remain valid for the scoped pattern.
Maintainability Example rule no longer suggests overly broad globs that could match nested or unrelated migrations/ trees.

Verdict

Decision: APPROVE
Risk: Very Low
Reason: Test-fixture-only glob scoping with no CLI, backend, or docs changes; behavior for the existing fixture is unchanged and the patterns now match documented enhanced-migration conventions.


Generated for commit 28006c4

@Kamirus Kamirus merged commit 0e7e3f7 into main Jun 26, 2026
26 checks passed
@Kamirus Kamirus deleted the fix/migration-self-contained-lint-glob branch June 26, 2026 14:11
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.

1 participant