Commit b54152f5 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'pl-todo-rubocop-lint-duplicate-methods' into 'master'

[RUN AS-IF-FOSS] Fix RuboCop Lint/DuplicateMethods todos

See merge request gitlab-org/gitlab!36935
parents 4577ea60 9d6da439
......@@ -153,23 +153,6 @@ Layout/SpaceInsideBlockBraces:
Layout/SpaceInsideParens:
Enabled: false
# Offense count: 19
Lint/DuplicateMethods:
Exclude:
- 'app/models/commit.rb'
- 'app/models/note.rb'
- 'lib/bitbucket/representation/repo.rb'
- 'lib/declarative_policy/base.rb'
- 'lib/gitlab/auth/ldap/person.rb'
- 'lib/gitlab/auth/o_auth/user.rb'
- 'lib/gitlab/ci/build/artifacts/metadata/entry.rb'
- 'lib/gitlab/cycle_analytics/base_event_fetcher.rb'
- 'lib/gitlab/diff/formatters/base_formatter.rb'
- 'lib/gitlab/git/blob.rb'
- 'lib/gitlab/git/repository.rb'
- 'lib/gitlab/git/tree.rb'
- 'lib/gitlab/git/wiki_page.rb'
# Offense count: 157
# Configuration parameters: MaximumRangeSize.
Lint/MissingCopEnableDirective:
......
......@@ -21,7 +21,6 @@ class Commit
participant :committer
participant :notes_with_associations
attr_accessor :author
attr_accessor :redacted_description_html
attr_accessor :redacted_title_html
attr_accessor :redacted_full_title_html
......
......@@ -61,7 +61,7 @@ class Note < ApplicationRecord
attr_accessor :commands_changes
# A special role that may be displayed on issuable's discussions
attr_accessor :special_role
attr_reader :special_role
default_value_for :system, false
......
......@@ -3,8 +3,6 @@
module Bitbucket
module Representation
class Repo < Representation::Base
attr_reader :owner, :slug
def initialize(raw)
super(raw)
end
......
......@@ -213,7 +213,7 @@ module DeclarativePolicy
#
# It also stores a reference to the cache, so it can be used
# to cache computations by e.g. ManifestCondition.
attr_reader :user, :subject, :cache
attr_reader :user, :subject
def initialize(user, subject, opts = {})
@user = user
@subject = subject
......
......@@ -11,7 +11,7 @@ module Gitlab
InvalidEntryError = Class.new(StandardError)
attr_accessor :entry, :provider
attr_accessor :provider
def self.find_by_uid(uid, adapter)
uid = Net::LDAP::Filter.escape(uid)
......
......@@ -12,7 +12,7 @@ module Gitlab
SignupDisabledError = Class.new(StandardError)
SigninDisabledForProviderError = Class.new(StandardError)
attr_accessor :auth_hash, :gl_user
attr_reader :auth_hash
def initialize(auth_hash)
self.auth_hash = auth_hash
......
......@@ -16,7 +16,7 @@ module Gitlab
#
class Entry
attr_reader :entries
attr_accessor :name
attr_writer :name
def initialize(path, entries)
@entries = entries
......
......@@ -6,7 +6,7 @@ module Gitlab
include BaseQuery
include GroupProjectsProvider
attr_reader :projections, :query, :stage, :order, :options
attr_reader :projections, :query, :stage, :options
MAX_EVENTS = 50
......
......@@ -10,7 +10,6 @@ module Gitlab
attr_reader :base_sha
attr_reader :start_sha
attr_reader :head_sha
attr_reader :position_type
def initialize(attrs)
if diff_file = attrs[:diff_file]
......
......@@ -25,7 +25,8 @@ module Gitlab
LFS_POINTER_MIN_SIZE = 120.bytes
LFS_POINTER_MAX_SIZE = 200.bytes
attr_accessor :name, :path, :size, :data, :mode, :id, :commit_id, :loaded_size, :binary
attr_accessor :size, :mode, :id, :commit_id, :loaded_size, :binary
attr_writer :name, :path, :data
define_counter :gitlab_blob_truncated_true do
docstring 'blob.truncated? == true'
......
......@@ -44,7 +44,7 @@ module Gitlab
# Relative path of repo
attr_reader :relative_path
attr_reader :storage, :gl_repository, :relative_path, :gl_project_path
attr_reader :storage, :gl_repository, :gl_project_path
# This remote name has to be stable for all types of repositories that
# can join an object pool. If it's structure ever changes, a migration
......
......@@ -6,8 +6,8 @@ module Gitlab
include Gitlab::EncodingHelper
extend Gitlab::Git::WrapsGitalyErrors
attr_accessor :id, :root_id, :name, :path, :flat_path, :type,
:mode, :commit_id, :submodule_url
attr_accessor :id, :root_id, :type, :mode, :commit_id, :submodule_url
attr_writer :name, :path, :flat_path
class << self
# Get list of tree objects
......
......@@ -3,7 +3,7 @@
module Gitlab
module Git
class WikiPage
attr_reader :url_path, :title, :format, :path, :version, :raw_data, :name, :text_data, :historical, :formatted_data
attr_reader :url_path, :title, :format, :path, :version, :raw_data, :name, :historical, :formatted_data
# This class abstracts away Gitlab::GitalyClient::WikiPage
def initialize(gitaly_page, version)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment