Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-23 15:09:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-23 15:09:33 +0300
commitb38fc20ae0e90d5b1c538a139aa0a7da1b7b5726 (patch)
tree3ce77cdb707b75c9d74c6ff2a8386dd06bd48b44 /rubocop
parentb3647b2a67930e8aa3c1b1dd9bda29c368c862ba (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/migration/hash_index.rb2
-rw-r--r--rubocop/cop/migration/prevent_strings.rb2
-rw-r--r--rubocop/cop/migration/remove_column.rb2
-rw-r--r--rubocop/cop/migration/remove_concurrent_index.rb2
-rw-r--r--rubocop/cop/migration/remove_index.rb2
-rw-r--r--rubocop/cop/migration/safer_boolean_column.rb6
-rw-r--r--rubocop/cop/migration/timestamps.rb2
-rw-r--r--rubocop/cop/migration/update_column_in_batches.rb2
-rw-r--r--rubocop/cop/migration/with_lock_retries_with_change.rb2
-rw-r--r--rubocop/cop/usage_data/distinct_count_by_large_foreign_key.rb2
10 files changed, 12 insertions, 12 deletions
diff --git a/rubocop/cop/migration/hash_index.rb b/rubocop/cop/migration/hash_index.rb
index dba202ef0e3..8becef891af 100644
--- a/rubocop/cop/migration/hash_index.rb
+++ b/rubocop/cop/migration/hash_index.rb
@@ -11,7 +11,7 @@ module RuboCop
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
+ 'recorded in the PostgreSQL WAL, you should use a btree index instead'
NAMES = Set.new([:add_index, :index, :add_concurrent_index]).freeze
diff --git a/rubocop/cop/migration/prevent_strings.rb b/rubocop/cop/migration/prevent_strings.rb
index bfeabd2c78d..57e29bf74ae 100644
--- a/rubocop/cop/migration/prevent_strings.rb
+++ b/rubocop/cop/migration/prevent_strings.rb
@@ -11,7 +11,7 @@ module RuboCop
MSG = 'Do not use the `string` data type, use `text` instead. ' \
'Updating limits on strings requires downtime. This can be avoided ' \
- 'by using `text` and adding a limit with `add_text_limit`'.freeze
+ 'by using `text` and adding a limit with `add_text_limit`'
def_node_matcher :reverting?, <<~PATTERN
(def :down ...)
diff --git a/rubocop/cop/migration/remove_column.rb b/rubocop/cop/migration/remove_column.rb
index f63df71467c..6a171ac948f 100644
--- a/rubocop/cop/migration/remove_column.rb
+++ b/rubocop/cop/migration/remove_column.rb
@@ -10,7 +10,7 @@ module RuboCop
class RemoveColumn < RuboCop::Cop::Cop
include MigrationHelpers
- MSG = '`remove_column` must only be used in post-deployment migrations'.freeze
+ MSG = '`remove_column` must only be used in post-deployment migrations'
def on_def(node)
def_method = node.children[0]
diff --git a/rubocop/cop/migration/remove_concurrent_index.rb b/rubocop/cop/migration/remove_concurrent_index.rb
index 8c2c6fb157e..30dd59d97bc 100644
--- a/rubocop/cop/migration/remove_concurrent_index.rb
+++ b/rubocop/cop/migration/remove_concurrent_index.rb
@@ -11,7 +11,7 @@ module RuboCop
include MigrationHelpers
MSG = '`remove_concurrent_index` is not reversible so you must manually define ' \
- 'the `up` and `down` methods in your migration class, using `add_concurrent_index` in `down`'.freeze
+ 'the `up` and `down` methods in your migration class, using `add_concurrent_index` in `down`'
def on_send(node)
return unless in_migration?(node)
diff --git a/rubocop/cop/migration/remove_index.rb b/rubocop/cop/migration/remove_index.rb
index 15c2f37b4b0..ca5d4af1520 100644
--- a/rubocop/cop/migration/remove_index.rb
+++ b/rubocop/cop/migration/remove_index.rb
@@ -9,7 +9,7 @@ module RuboCop
class RemoveIndex < RuboCop::Cop::Cop
include MigrationHelpers
- MSG = '`remove_index` requires downtime, use `remove_concurrent_index` instead'.freeze
+ MSG = '`remove_index` requires downtime, use `remove_concurrent_index` instead'
def on_def(node)
return unless in_migration?(node)
diff --git a/rubocop/cop/migration/safer_boolean_column.rb b/rubocop/cop/migration/safer_boolean_column.rb
index 06bb24707bd..1d780d96afa 100644
--- a/rubocop/cop/migration/safer_boolean_column.rb
+++ b/rubocop/cop/migration/safer_boolean_column.rb
@@ -21,9 +21,9 @@ module RuboCop
class SaferBooleanColumn < RuboCop::Cop::Cop
include MigrationHelpers
- DEFAULT_OFFENSE = 'Boolean columns on the `%s` table should have a default. You may wish to use `add_column_with_default`.'.freeze
- NULL_OFFENSE = 'Boolean columns on the `%s` table should disallow nulls.'.freeze
- DEFAULT_AND_NULL_OFFENSE = 'Boolean columns on the `%s` table should have a default and should disallow nulls. You may wish to use `add_column_with_default`.'.freeze
+ DEFAULT_OFFENSE = 'Boolean columns on the `%s` table should have a default. You may wish to use `add_column_with_default`.'
+ NULL_OFFENSE = 'Boolean columns on the `%s` table should disallow nulls.'
+ DEFAULT_AND_NULL_OFFENSE = 'Boolean columns on the `%s` table should have a default and should disallow nulls. You may wish to use `add_column_with_default`.'
def_node_matcher :add_column?, <<~PATTERN
(send nil? :add_column $...)
diff --git a/rubocop/cop/migration/timestamps.rb b/rubocop/cop/migration/timestamps.rb
index 5584d49ee8c..44baf17d968 100644
--- a/rubocop/cop/migration/timestamps.rb
+++ b/rubocop/cop/migration/timestamps.rb
@@ -9,7 +9,7 @@ module RuboCop
class Timestamps < RuboCop::Cop::Cop
include MigrationHelpers
- MSG = 'Do not use `timestamps`, use `timestamps_with_timezone` instead'.freeze
+ MSG = 'Do not use `timestamps`, use `timestamps_with_timezone` instead'
# Check methods in table creation.
def on_def(node)
diff --git a/rubocop/cop/migration/update_column_in_batches.rb b/rubocop/cop/migration/update_column_in_batches.rb
index d23e0d28380..e23042e1b9f 100644
--- a/rubocop/cop/migration/update_column_in_batches.rb
+++ b/rubocop/cop/migration/update_column_in_batches.rb
@@ -11,7 +11,7 @@ module RuboCop
include MigrationHelpers
MSG = 'Migration running `update_column_in_batches` must have a spec file at' \
- ' `%s`.'.freeze
+ ' `%s`.'
def on_send(node)
return unless in_migration?(node)
diff --git a/rubocop/cop/migration/with_lock_retries_with_change.rb b/rubocop/cop/migration/with_lock_retries_with_change.rb
index 36fc1f92833..9d11edcb6a1 100644
--- a/rubocop/cop/migration/with_lock_retries_with_change.rb
+++ b/rubocop/cop/migration/with_lock_retries_with_change.rb
@@ -10,7 +10,7 @@ module RuboCop
include MigrationHelpers
MSG = '`with_lock_retries` cannot be used within `change` so you must manually define ' \
- 'the `up` and `down` methods in your migration class and use `with_lock_retries` in both methods'.freeze
+ 'the `up` and `down` methods in your migration class and use `with_lock_retries` in both methods'
def on_send(node)
return unless in_migration?(node)
diff --git a/rubocop/cop/usage_data/distinct_count_by_large_foreign_key.rb b/rubocop/cop/usage_data/distinct_count_by_large_foreign_key.rb
index 9fdf52dac8b..3aad089d961 100644
--- a/rubocop/cop/usage_data/distinct_count_by_large_foreign_key.rb
+++ b/rubocop/cop/usage_data/distinct_count_by_large_foreign_key.rb
@@ -13,7 +13,7 @@ module RuboCop
# distinct_count(Ci::Build, :commit_id)
#
class DistinctCountByLargeForeignKey < RuboCop::Cop::Cop
- MSG = 'Avoid doing `%s` on foreign keys for large tables having above 100 million rows.'.freeze
+ MSG = 'Avoid doing `%s` on foreign keys for large tables having above 100 million rows.'
def_node_matcher :distinct_count?, <<-PATTERN
(send _ $:distinct_count $...)