diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-24 15:10:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-24 15:10:17 +0300 |
commit | 4b9bde7848d9538c1635ffe7a5385ba013487b4a (patch) | |
tree | 5aad1d5d94ea233a36c8ac2850e099236e1c2cdc /rubocop | |
parent | 2f752481c2e727834216a93dee82df9f8e2acb2e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/usage_data/distinct_count_by_large_foreign_key.rb | 2 | ||||
-rw-r--r-- | rubocop/rubocop-usage-data.yml | 1 |
2 files changed, 2 insertions, 1 deletions
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 c10ecbcb4ba..e28dabfe39f 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 @@ -31,7 +31,7 @@ module RuboCop private def allowed_foreign_key?(key) - key.type == :sym && allowed_foreign_keys.include?(key.value) + [:sym, :str].include?(key.type) && allowed_foreign_keys.include?(key.value.to_sym) end def allowed_foreign_keys diff --git a/rubocop/rubocop-usage-data.yml b/rubocop/rubocop-usage-data.yml index 46e8a067431..479d8620717 100644 --- a/rubocop/rubocop-usage-data.yml +++ b/rubocop/rubocop-usage-data.yml @@ -44,3 +44,4 @@ UsageData/DistinctCountByLargeForeignKey: - :project_id - :issue_id - :merge_request_id + - :merge_requests.target_project_id |