diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-16 21:09:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-16 21:09:47 +0300 |
commit | bf1600d157465f9408aace91073954fd5790c054 (patch) | |
tree | f317bb99330769c4eb37621c860af014810e554b /rubocop | |
parent | 6de7d2c195a8a7fa5702cafa4365f7a9fcac37cd (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 | 4 | ||||
-rw-r--r-- | rubocop/rubocop-usage-data.yml | 19 |
2 files changed, 12 insertions, 11 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 e28dabfe39f..36bcda527e8 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,11 +31,11 @@ module RuboCop private def allowed_foreign_key?(key) - [:sym, :str].include?(key.type) && allowed_foreign_keys.include?(key.value.to_sym) + [:sym, :str].include?(key.type) && allowed_foreign_keys.include?(key.value.to_s) end def allowed_foreign_keys - cop_config['AllowedForeignKeys'] || [] + (cop_config['AllowedForeignKeys'] || []).map(&:to_s) end end end diff --git a/rubocop/rubocop-usage-data.yml b/rubocop/rubocop-usage-data.yml index bcdb0631090..9f594bc5817 100644 --- a/rubocop/rubocop-usage-data.yml +++ b/rubocop/rubocop-usage-data.yml @@ -38,12 +38,13 @@ UsageData/DistinctCountByLargeForeignKey: - 'lib/gitlab/usage_data.rb' - 'ee/lib/ee/gitlab/usage_data.rb' AllowedForeignKeys: - - :user_id - - :author_id - - :creator_id - - :owner_id - - :project_id - - :issue_id - - :merge_request_id - - :merge_requests.target_project_id - - :agent_id + - 'agent_id' + - 'author_id' + - 'clusters.user_id' + - 'creator_id' + - 'issue_id' + - 'merge_request_id' + - 'merge_requests.target_project_id' + - 'owner_id' + - 'project_id' + - 'user_id' |