Shopify/packwerk

Privacy violations in migrations

Closed this issue · 1 comments

Problem

Privacy violations in migrations seem to be caught by Packwerk.

image

image

We suspect the t.belongs_to(:order) is what is setting off the violation, as Packwerk thinks it is an active record association.

To get rid of these type of violations, users have been putting this violation in to the deprecated_references.yml list.

Potential solutions

There may be two solutions:

  1. change the associations inspector to ignore methods that are not called on an implicit self
  2. ignore violations in migrations files

We've opted to ignore migration files for now. Let's see if this problem comes up again.