class NdrDevSupport::RakeCI::CommitCop::MigrationWithoutStructureDump

This cop checks for new migrations with no accompanying structure dump

Public Instance Methods

check(changes) click to toggle source
# File lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb, line 10
def check(changes)
  return unless changes[:added].any?(&unscoped_migration_file?) &&
                changes[:modified].none?(&structure_dump_file?)

  attachment(:danger,
             'No structure file committed',
             'Migration(s) were added with no accompanying structure file(s)')
end