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>2022-12-02 03:07:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-02 03:07:06 +0300
commitb26eec8cbcf32085079eee0e196456eccefc993f (patch)
tree822f69aeec23b0b3512583b2221000a8035241f7 /rubocop
parent61666f277a484725307ae2b34697b13a300b2129 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/migration/add_limit_to_text_columns.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/rubocop/cop/migration/add_limit_to_text_columns.rb b/rubocop/cop/migration/add_limit_to_text_columns.rb
index 5c71fbbfaa2..2d3b5d5094f 100644
--- a/rubocop/cop/migration/add_limit_to_text_columns.rb
+++ b/rubocop/cop/migration/add_limit_to_text_columns.rb
@@ -44,11 +44,9 @@ module RuboCop
if text_operation_with_limit?(send_node)
add_offense(send_node.loc.selector, message: TEXT_LIMIT_ATTRIBUTE_NOT_ALLOWED) if version(node) < TEXT_LIMIT_ATTRIBUTE_ALLOWED_SINCE
- else
+ elsif text_limit_missing?(node, *table_and_attribute_name(send_node))
# We require a limit for the same table and attribute name
- if text_limit_missing?(node, *table_and_attribute_name(send_node))
- add_offense(send_node.loc.selector)
- end
+ add_offense(send_node.loc.selector)
end
end
end