lib/rubocop/cop/migration/update_large_table.rb in gitlab-styles-8.0.0 vs lib/rubocop/cop/migration/update_large_table.rb in gitlab-styles-9.0.0

- old
+ new

@@ -2,25 +2,26 @@ require_relative '../../../gitlab/styles/rubocop/migration_helpers' module Rubocop module Cop module Migration - # This cop checks for methods that may lead to batch type issues on a table that's been + # Checks for methods that may lead to batch type issues on a table that's been # explicitly denied because of its size. # # Even though though these methods perform functions to avoid # downtime, using it with tables with millions of rows still causes a # significant delay in the deploy process and is best avoided. # # See https://gitlab.com/gitlab-com/infrastructure/issues/1602 for more # information. - class UpdateLargeTable < RuboCop::Cop::Cop + class UpdateLargeTable < RuboCop::Cop::Base include Gitlab::Styles::Rubocop::MigrationHelpers MSG = 'Using `%s` on the `%s` table will take a long time to ' \ - 'complete, and should be avoided unless absolutely ' \ - 'necessary' + 'complete, and should be avoided unless absolutely ' \ + 'necessary' + # @!method batch_update?(node) def_node_matcher :batch_update?, <<~PATTERN (send nil? ${#denied_method?} (sym $...) ...) PATTERN