summaryrefslogtreecommitdiff
path: root/rubocop/rubocop.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-06-18 10:31:41 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-20 18:13:13 +0200
commitf3f1df1476ba7fe223e5d8d6707a7675dc9fa597 (patch)
treeb821f022ed4fd4201a3b86888f0d4a65b60d0411 /rubocop/rubocop.rb
parent03b88937757238c26a0bd2f3446dde03e7041b36 (diff)
downloadgitlab-ce-f3f1df1476ba7fe223e5d8d6707a7675dc9fa597.tar.gz
Add a cop for `FinderMethods`bvl-finder-methods-cop
This notifies developers when calling `find(_by!)` chained on `execute`. And suggests using the methods from `FinderMethods`. These will perform the correct authorization checks on the resource when it is found.
Diffstat (limited to 'rubocop/rubocop.rb')
-rw-r--r--rubocop/rubocop.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/rubocop/rubocop.rb b/rubocop/rubocop.rb
index f05990232ab..aa7ae601f75 100644
--- a/rubocop/rubocop.rb
+++ b/rubocop/rubocop.rb
@@ -2,6 +2,7 @@
require_relative 'cop/gitlab/module_with_instance_variables'
require_relative 'cop/gitlab/predicate_memoization'
require_relative 'cop/gitlab/httparty'
+require_relative 'cop/gitlab/finder_with_find_by'
require_relative 'cop/include_sidekiq_worker'
require_relative 'cop/avoid_return_from_blocks'
require_relative 'cop/avoid_break_from_strong_memoize'