testdouble/good-migrations

Complain about any `config.autoload_paths` code used in migration?

Opened this issue · 1 comments

Thanks for your work in creating and maintaining this gem.

Currently, it only warns for app:

if path.starts_with? File.join(Rails.application.root, "app")

We'd love if this was configurable, or perhaps respected config.autoload_paths. The reasoning is: occasionally in our data migrations, we'll use code in /lib. Some production instances of our app may run the migrations months later, when the underlying code may have changed, and any calls to /lib are therefore potentially unsafe.

Happy to submit a PR here if this sounds appropriate!