Sha256: 791d0792b680b91cb819addbd37baaae74350ce4da9bd51563c5b6e161b646fc
Contents?: true
Size: 562 Bytes
Versions: 25
Compression:
Stored size: 562 Bytes
Contents
# frozen_string_literal: true module Gitlab module Styles module Rubocop # Module containing helper methods for writing migration cops. module MigrationHelpers # Returns true if the given node originated from the db/migrate directory. def in_migration?(node) dirname = File.dirname(node.location.expression.source_buffer.name) dirname.end_with?( 'db/migrate', 'db/post_migrate', 'ee/db/migrate', 'ee/db/post_migrate') end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems