Rbtz.CredoChecks.MigrationSource (rbtz_credo_checks v0.2.0)

Copy Markdown View Source

Shared helpers for Credo checks that only want to run against Ecto migration files.

A path counts as a migration when it lives under a migrations/ directory anywhere in the expanded path and ends in .exs. This covers both the default priv/repo/migrations/ layout and multi-repo projects that nest migrations under priv/<repo>/migrations/.

Summary

Functions

Returns true when filename looks like an Ecto migration file.

Functions

migration_file?(filename)

Returns true when filename looks like an Ecto migration file.