From 2039c8280db1646845c33d6c5a74e5f23ca6f4de Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 27 Aug 2018 17:31:01 +0200 Subject: Disable existing offenses for the CodeReuse cops This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop. --- lib/gitlab/shell.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/gitlab/shell.rb') diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb index a17cd27e82d..c6fbdc5ddd9 100644 --- a/lib/gitlab/shell.rb +++ b/lib/gitlab/shell.rb @@ -225,6 +225,7 @@ module Gitlab # Ex. # remove_keys_not_found_in_db # + # rubocop: disable CodeReuse/ActiveRecord def remove_keys_not_found_in_db return unless self.authorized_keys_enabled? @@ -243,6 +244,7 @@ module Gitlab end end end + # rubocop: enable CodeReuse/ActiveRecord # Iterate over all ssh key IDs from gitlab shell, in batches # @@ -326,9 +328,11 @@ module Gitlab # exists?(storage, 'gitlab') # exists?(storage, 'gitlab/cookies.git') # + # rubocop: disable CodeReuse/ActiveRecord def exists?(storage, dir_name) Gitlab::GitalyClient::NamespaceService.new(storage).exists?(dir_name) end + # rubocop: enable CodeReuse/ActiveRecord protected -- cgit v1.2.3