Run EnsureFactoryForTable in CE to avoid RedundantCopDisableDirective
What does this MR do and why?
Currently, we skip the Migration/EnsureFactoryForTable cop when running in CE. This results in a Lint/RedundantCopDisableDirective offense when there's a "rubocop: disable Migration/EnsureFactoryForTable" comment.
To avoid this, we now run the Migration/EnsureFactoryForTable cop when a disable comment is present. This prevents the redundant disable directive offense.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
Run the following:
export FOSS_ONLY=1
f=db/migrate/20240515022318_create_duo_workflows_tables.rb
bundle exec rubocop --stop-server && bundle exec rubocop $f -C false
Related to #509032 (closed)