summaryrefslogtreecommitdiff
path: root/rubocop/cop/migration/hash_index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'rubocop/cop/migration/hash_index.rb')
-rw-r--r--rubocop/cop/migration/hash_index.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/rubocop/cop/migration/hash_index.rb b/rubocop/cop/migration/hash_index.rb
index 3206b73bd3d..f939a84deb0 100644
--- a/rubocop/cop/migration/hash_index.rb
+++ b/rubocop/cop/migration/hash_index.rb
@@ -1,5 +1,5 @@
-require 'set'
-require_relative '../../migration_helpers'
+require "set"
+require_relative "../../migration_helpers"
module RuboCop
module Cop
@@ -8,8 +8,8 @@ module RuboCop
class HashIndex < RuboCop::Cop::Cop
include MigrationHelpers
- MSG = 'hash indexes should be avoided at all costs since they are not ' \
- 'recorded in the PostgreSQL WAL, you should use a btree index instead'.freeze
+ MSG = "hash indexes should be avoided at all costs since they are not " \
+ "recorded in the PostgreSQL WAL, you should use a btree index instead".freeze
NAMES = Set.new([:add_index, :index, :add_concurrent_index]).freeze
@@ -26,9 +26,9 @@ module RuboCop
opts.each_node(:pair) do |pair|
next unless hash_key_type(pair) == :sym &&
- hash_key_name(pair) == :using
+ hash_key_name(pair) == :using
- if hash_key_value(pair).to_s == 'hash'
+ if hash_key_value(pair).to_s == "hash"
add_offense(pair, location: :expression)
end
end