summaryrefslogtreecommitdiff
path: root/rubocop/rubocop.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-04-08 15:33:36 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2019-04-15 13:05:14 +0200
commit650f40865e5d8136cb366fbde689c4100aafb0c5 (patch)
treef740d9f235693ad8e2a3693d6ec30dee26d2a74a /rubocop/rubocop.rb
parent7457c1e1229cd1e90e608e8b247e2fbb217f05b6 (diff)
downloadgitlab-ce-650f40865e5d8136cb366fbde689c4100aafb0c5.tar.gz
Forbid the use of `#reload` and prefer `#reset`forbid-the-usage-of-reload
The `#reload` makes to load all objects into memory, and the main purpose of `#reload` is to drop the association cache. The `#reset` seems to solve exactly that case.
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 3e33419eb2e..50eab6f9270 100644
--- a/rubocop/rubocop.rb
+++ b/rubocop/rubocop.rb
@@ -6,6 +6,7 @@ require_relative 'cop/gitlab/finder_with_find_by'
require_relative 'cop/gitlab/union'
require_relative 'cop/include_sidekiq_worker'
require_relative 'cop/safe_params'
+require_relative 'cop/active_record_association_reload'
require_relative 'cop/avoid_return_from_blocks'
require_relative 'cop/avoid_break_from_strong_memoize'
require_relative 'cop/avoid_route_redirect_leading_slash'