Skip to content

Remove `exclude` rule for `Migration/CreateTableWithForeignKeys` cop

What does this MR do and why?

This MR removes an exclude regex for the Migration/CreateTableWithForeignKeys cop

Background

I saw this issue in our backlog to fix the existing migrations so that this exclude rule could be removed.

I intended to

  1. remove the rule
  2. run bundle exec rubocop db/migrate/* db/post_migrate/* to find violations
  3. fix the violations

However, when I removed the rule and ran rubocop, I saw no failures to correct. The number of files inspected also did not change

I checked gitlab/.rubocop_todo/* and didn't see any additional exclusions

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.

Screenshots or screen recordings

Before After
Screenshot_from_2024-02-07_14-13-28 Screenshot_from_2024-02-07_14-14-36

How to set up and validate locally

  1. run bundle exec rubocop db/migrate/* db/post_migrate/*
  2. see if there are any failures

Related to #247645 (closed)

Edited by Michael Becker

Merge request reports