diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-02 03:07:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-02 03:07:06 +0300 |
commit | b26eec8cbcf32085079eee0e196456eccefc993f (patch) | |
tree | 822f69aeec23b0b3512583b2221000a8035241f7 /rubocop | |
parent | 61666f277a484725307ae2b34697b13a300b2129 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/migration/add_limit_to_text_columns.rb | 6 |
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 |