Skip to content

Add TooManyMigrationRuns cop to test performance#4850

Draft
johha wants to merge 1 commit intomainfrom
migration-cop
Draft

Add TooManyMigrationRuns cop to test performance#4850
johha wants to merge 1 commit intomainfrom
migration-cop

Conversation

@johha
Copy link
Contributor

@johha johha commented Feb 16, 2026

Enforces max 4 migration runs per test file to prevent expensive repeated migrations. Detects subjects, let helpers, helper methods, and before/after blocks. Intentionally simple to avoid false positives on edge cases.

Also reduce number of migration calls in _add_state_to_stacks_spec to please Rubocop.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

Enforces max 4 migration runs per test file to prevent expensive repeated migrations.
Detects subjects, let helpers, helper methods, and before/after blocks.
Intentionally simple to avoid false positives on edge cases.

Also reduce number of migration calls in `_add_state_to_stacks_spec` & `bigint_migration_step1_shared_context` to please Rubocop.
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