Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7c4f0b8d
Commit
7c4f0b8d
authored
Feb 22, 2022
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Layout/EmptyLinesAroundAttributeAccessor offences
Fix and enable `Layout/EmptyLinesAroundAttributeAccessor`
parent
0428d3e6
Changes
51
Show whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
51 additions
and
7 deletions
+51
-7
.rubocop_todo.yml
.rubocop_todo.yml
+0
-7
app/mailers/application_mailer.rb
app/mailers/application_mailer.rb
+1
-0
app/models/lfs_download_object.rb
app/models/lfs_download_object.rb
+1
-0
app/models/storage/hashed.rb
app/models/storage/hashed.rb
+1
-0
app/models/storage/legacy_project.rb
app/models/storage/legacy_project.rb
+1
-0
app/models/wiki_page.rb
app/models/wiki_page.rb
+1
-0
app/services/ci/test_failure_history_service.rb
app/services/ci/test_failure_history_service.rb
+1
-0
app/services/concerns/rate_limited_service.rb
app/services/concerns/rate_limited_service.rb
+1
-0
app/services/concerns/update_repository_storage_methods.rb
app/services/concerns/update_repository_storage_methods.rb
+1
-0
app/services/notification_recipients/builder/merge_request_unmergeable.rb
...ification_recipients/builder/merge_request_unmergeable.rb
+1
-0
app/services/notification_recipients/builder/new_note.rb
app/services/notification_recipients/builder/new_note.rb
+1
-0
app/services/notification_recipients/builder/new_review.rb
app/services/notification_recipients/builder/new_review.rb
+1
-0
app/services/notification_service.rb
app/services/notification_service.rb
+1
-0
app/services/projects/base_move_relations_service.rb
app/services/projects/base_move_relations_service.rb
+1
-0
app/services/projects/lfs_pointers/lfs_download_service.rb
app/services/projects/lfs_pointers/lfs_download_service.rb
+1
-0
config/initializers/http_hostname_override.rb
config/initializers/http_hostname_override.rb
+1
-0
ee/app/finders/security/findings_finder.rb
ee/app/finders/security/findings_finder.rb
+1
-0
ee/app/services/ci/pipeline_creation/drop_not_runnable_builds_service.rb
.../ci/pipeline_creation/drop_not_runnable_builds_service.rb
+1
-0
ee/app/services/vulnerability_external_issue_links/create_service.rb
...ices/vulnerability_external_issue_links/create_service.rb
+1
-0
ee/lib/gitlab/auth/group_saml/response_check.rb
ee/lib/gitlab/auth/group_saml/response_check.rb
+1
-0
ee/lib/incident_management/oncall_shift_generator.rb
ee/lib/incident_management/oncall_shift_generator.rb
+1
-0
lib/gitlab/auth/auth_finders.rb
lib/gitlab/auth/auth_finders.rb
+1
-0
lib/gitlab/auth/o_auth/auth_hash.rb
lib/gitlab/auth/o_auth/auth_hash.rb
+1
-0
lib/gitlab/checks/base_bulk_checker.rb
lib/gitlab/checks/base_bulk_checker.rb
+1
-0
lib/gitlab/checks/base_single_checker.rb
lib/gitlab/checks/base_single_checker.rb
+1
-0
lib/gitlab/ci/pipeline/logger.rb
lib/gitlab/ci/pipeline/logger.rb
+1
-0
lib/gitlab/ci/trace/remote_checksum.rb
lib/gitlab/ci/trace/remote_checksum.rb
+1
-0
lib/gitlab/ci/variables/builder.rb
lib/gitlab/ci/variables/builder.rb
+1
-0
lib/gitlab/database/count/exact_count_strategy.rb
lib/gitlab/database/count/exact_count_strategy.rb
+1
-0
lib/gitlab/database/count/reltuples_count_strategy.rb
lib/gitlab/database/count/reltuples_count_strategy.rb
+1
-0
lib/gitlab/database/partitioning/partition_manager.rb
lib/gitlab/database/partitioning/partition_manager.rb
+1
-0
lib/gitlab/database/partitioning/replace_table.rb
lib/gitlab/database/partitioning/replace_table.rb
+1
-0
lib/gitlab/email/html_parser.rb
lib/gitlab/email/html_parser.rb
+1
-0
lib/gitlab/git/blame.rb
lib/gitlab/git/blame.rb
+1
-0
lib/gitlab/graphql/batch_key.rb
lib/gitlab/graphql/batch_key.rb
+1
-0
lib/gitlab/insecure_key_fingerprint.rb
lib/gitlab/insecure_key_fingerprint.rb
+1
-0
lib/gitlab/pagination/gitaly_keyset_pager.rb
lib/gitlab/pagination/gitaly_keyset_pager.rb
+1
-0
lib/gitlab/pagination/keyset/cursor_based_request_context.rb
lib/gitlab/pagination/keyset/cursor_based_request_context.rb
+1
-0
lib/gitlab/pagination/keyset/header_builder.rb
lib/gitlab/pagination/keyset/header_builder.rb
+1
-0
lib/gitlab/pagination/offset_pagination.rb
lib/gitlab/pagination/offset_pagination.rb
+1
-0
lib/gitlab/prometheus/queries/base_query.rb
lib/gitlab/prometheus/queries/base_query.rb
+1
-0
lib/sidebars/menu.rb
lib/sidebars/menu.rb
+1
-0
qa/qa/git/location.rb
qa/qa/git/location.rb
+1
-0
qa/qa/specs/runner.rb
qa/qa/specs/runner.rb
+1
-0
spec/controllers/application_controller_spec.rb
spec/controllers/application_controller_spec.rb
+1
-0
spec/models/concerns/mentionable_spec.rb
spec/models/concerns/mentionable_spec.rb
+1
-0
spec/support/helpers/sorting_helper.rb
spec/support/helpers/sorting_helper.rb
+1
-0
spec/validators/array_members_validator_spec.rb
spec/validators/array_members_validator_spec.rb
+1
-0
spec/validators/color_validator_spec.rb
spec/validators/color_validator_spec.rb
+1
-0
spec/validators/cron_validator_spec.rb
spec/validators/cron_validator_spec.rb
+2
-0
spec/validators/future_date_validator_spec.rb
spec/validators/future_date_validator_spec.rb
+1
-0
No files found.
.rubocop_todo.yml
View file @
7c4f0b8d
...
...
@@ -32,13 +32,6 @@ Graphql/IDType:
Layout/ArgumentAlignment
:
Enabled
:
false
# Offense count: 54
# Cop supports --auto-correct.
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
# AllowedMethods: alias_method, public, protected, private
Layout/EmptyLinesAroundAttributeAccessor
:
Enabled
:
false
# Offense count: 771
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
...
...
app/mailers/application_mailer.rb
View file @
7c4f0b8d
...
...
@@ -7,6 +7,7 @@ class ApplicationMailer < ActionMailer::Base
helper
MarkupHelper
attr_accessor
:current_user
helper_method
:current_user
,
:can?
default
from:
proc
{
default_sender_address
.
format
}
...
...
app/models/lfs_download_object.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ class LfsDownloadObject
include
ActiveModel
::
Validations
attr_accessor
:oid
,
:size
,
:link
,
:headers
delegate
:sanitized_url
,
:credentials
,
to: :sanitized_uri
validates
:oid
,
format:
{
with:
/\A\h{64}\z/
}
...
...
app/models/storage/hashed.rb
View file @
7c4f0b8d
...
...
@@ -3,6 +3,7 @@
module
Storage
class
Hashed
attr_accessor
:container
delegate
:gitlab_shell
,
:repository_storage
,
to: :container
REPOSITORY_PATH_PREFIX
=
'@hashed'
...
...
app/models/storage/legacy_project.rb
View file @
7c4f0b8d
...
...
@@ -3,6 +3,7 @@
module
Storage
class
LegacyProject
attr_accessor
:project
delegate
:namespace
,
:gitlab_shell
,
:repository_storage
,
to: :project
def
initialize
(
project
)
...
...
app/models/wiki_page.rb
View file @
7c4f0b8d
...
...
@@ -45,6 +45,7 @@ class WikiPage
# The GitLab Wiki instance.
attr_reader
:wiki
delegate
:container
,
to: :wiki
# The raw Gitlab::Git::WikiPage instance.
...
...
app/services/ci/test_failure_history_service.rb
View file @
7c4f0b8d
...
...
@@ -17,6 +17,7 @@ module Ci
MAX_TRACKABLE_FAILURES
=
200
attr_reader
:pipeline
delegate
:project
,
to: :pipeline
def
initialize
(
pipeline
)
...
...
app/services/concerns/rate_limited_service.rb
View file @
7c4f0b8d
...
...
@@ -57,6 +57,7 @@ module RateLimitedService
prepended
do
attr_accessor
:rate_limiter_bypassed
cattr_accessor
:rate_limiter_scoped_and_keyed
def
self
.
rate_limit
(
key
:,
opts
:,
rate_limiter:
::
Gitlab
::
ApplicationRateLimiter
)
...
...
app/services/concerns/update_repository_storage_methods.rb
View file @
7c4f0b8d
...
...
@@ -6,6 +6,7 @@ module UpdateRepositoryStorageMethods
Error
=
Class
.
new
(
StandardError
)
attr_reader
:repository_storage_move
delegate
:container
,
:source_storage_name
,
:destination_storage_name
,
to: :repository_storage_move
def
initialize
(
repository_storage_move
)
...
...
app/services/notification_recipients/builder/merge_request_unmergeable.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module NotificationRecipients
module
Builder
class
MergeRequestUnmergeable
<
Base
attr_reader
:target
def
initialize
(
merge_request
)
@target
=
merge_request
end
...
...
app/services/notification_recipients/builder/new_note.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module NotificationRecipients
module
Builder
class
NewNote
<
Base
attr_reader
:note
def
initialize
(
note
)
@note
=
note
end
...
...
app/services/notification_recipients/builder/new_review.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module NotificationRecipients
module
Builder
class
NewReview
<
Base
attr_reader
:review
def
initialize
(
review
)
@review
=
review
end
...
...
app/services/notification_service.rb
View file @
7c4f0b8d
...
...
@@ -18,6 +18,7 @@
class
NotificationService
class
Async
attr_reader
:parent
delegate
:respond_to_missing
,
to: :parent
def
initialize
(
parent
)
...
...
app/services/projects/base_move_relations_service.rb
View file @
7c4f0b8d
...
...
@@ -3,6 +3,7 @@
module
Projects
class
BaseMoveRelationsService
<
BaseService
attr_reader
:source_project
def
execute
(
source_project
,
remove_remaining_elements:
true
)
return
if
source_project
.
blank?
...
...
app/services/projects/lfs_pointers/lfs_download_service.rb
View file @
7c4f0b8d
...
...
@@ -11,6 +11,7 @@ module Projects
LARGE_FILE_SIZE
=
1
.
megabytes
attr_reader
:lfs_download_object
delegate
:oid
,
:size
,
:credentials
,
:sanitized_url
,
:headers
,
to: :lfs_download_object
,
prefix: :lfs
def
initialize
(
project
,
lfs_download_object
)
...
...
config/initializers/http_hostname_override.rb
View file @
7c4f0b8d
...
...
@@ -34,6 +34,7 @@ end
class
Net::HTTP
attr_accessor
:hostname_override
SSL_IVNAMES
<<
:@hostname_override
SSL_ATTRIBUTES
<<
:hostname_override
...
...
ee/app/finders/security/findings_finder.rb
View file @
7c4f0b8d
...
...
@@ -37,6 +37,7 @@ module Security
private
attr_reader
:pipeline
,
:params
delegate
:project
,
:has_security_findings?
,
to: :pipeline
,
private:
true
def
findings
...
...
ee/app/services/ci/pipeline_creation/drop_not_runnable_builds_service.rb
View file @
7c4f0b8d
...
...
@@ -22,6 +22,7 @@ module Ci
attr_reader
:pipeline
attr_reader
:runner_minutes
delegate
:project
,
to: :pipeline
def
validate_build_matchers
...
...
ee/app/services/vulnerability_external_issue_links/create_service.rb
View file @
7c4f0b8d
...
...
@@ -34,6 +34,7 @@ module VulnerabilityExternalIssueLinks
private
attr_reader
:user
,
:vulnerability
,
:link_type
,
:external_provider
,
:external_provider_service
,
:external_issue_link
delegate
:project
,
to: :vulnerability
def
create_external_issue
...
...
ee/lib/gitlab/auth/group_saml/response_check.rb
View file @
7c4f0b8d
...
...
@@ -7,6 +7,7 @@ module Gitlab
include
ActiveModel
::
Model
attr_reader
:xml_response
,
:identity
delegate
:name_id
,
:name_id_format
,
:xml
,
to: :xml_response
validate
:response_error_passthrough!
...
...
ee/lib/incident_management/oncall_shift_generator.rb
View file @
7c4f0b8d
...
...
@@ -63,6 +63,7 @@ module IncidentManagement
private
attr_reader
:rotation
delegate
:shift_cycle_duration
,
to: :rotation
# Starting time of a shift which covers the timestamp.
...
...
lib/gitlab/auth/auth_finders.rb
View file @
7c4f0b8d
...
...
@@ -12,6 +12,7 @@ module Gitlab
class
InsufficientScopeError
<
AuthenticationError
attr_reader
:scopes
def
initialize
(
scopes
)
@scopes
=
scopes
.
map
{
|
s
|
s
.
try
(
:name
)
||
s
}
end
...
...
lib/gitlab/auth/o_auth/auth_hash.rb
View file @
7c4f0b8d
...
...
@@ -7,6 +7,7 @@ module Gitlab
module
OAuth
class
AuthHash
attr_reader
:auth_hash
def
initialize
(
auth_hash
)
@auth_hash
=
auth_hash
end
...
...
lib/gitlab/checks/base_bulk_checker.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module Gitlab
module
Checks
class
BaseBulkChecker
<
BaseChecker
attr_reader
:changes_access
delegate
(
*
ChangesAccess
::
ATTRIBUTES
,
to: :changes_access
)
def
initialize
(
changes_access
)
...
...
lib/gitlab/checks/base_single_checker.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module Gitlab
module
Checks
class
BaseSingleChecker
<
BaseChecker
attr_reader
:change_access
delegate
(
*
SingleChangeAccess
::
ATTRIBUTES
,
to: :change_access
)
def
initialize
(
change_access
)
...
...
lib/gitlab/ci/pipeline/logger.rb
View file @
7c4f0b8d
...
...
@@ -94,6 +94,7 @@ module Gitlab
private
attr_reader
:project
,
:destination
,
:started_at
,
:log_conditions
delegate
:current_monotonic_time
,
to: :class
def
age
...
...
lib/gitlab/ci/trace/remote_checksum.rb
View file @
7c4f0b8d
...
...
@@ -23,6 +23,7 @@ module Gitlab
private
attr_reader
:trace_artifact
delegate
:aws?
,
:google?
,
to: :object_store_config
,
prefix: :provider
def
fetch_md5_checksum
...
...
lib/gitlab/ci/variables/builder.rb
View file @
7c4f0b8d
...
...
@@ -96,6 +96,7 @@ module Gitlab
attr_reader
:instance_variables_builder
attr_reader
:project_variables_builder
attr_reader
:group_variables_builder
delegate
:project
,
to: :pipeline
def
predefined_variables
(
job
)
...
...
lib/gitlab/database/count/exact_count_strategy.rb
View file @
7c4f0b8d
...
...
@@ -12,6 +12,7 @@ module Gitlab
# Note that for very large tables, this may even timeout.
class
ExactCountStrategy
attr_reader
:models
def
initialize
(
models
)
@models
=
models
end
...
...
lib/gitlab/database/count/reltuples_count_strategy.rb
View file @
7c4f0b8d
...
...
@@ -14,6 +14,7 @@ module Gitlab
# however is guaranteed to be "fast", because it only looks up statistics.
class
ReltuplesCountStrategy
attr_reader
:models
def
initialize
(
models
)
@models
=
models
end
...
...
lib/gitlab/database/partitioning/partition_manager.rb
View file @
7c4f0b8d
...
...
@@ -46,6 +46,7 @@ module Gitlab
private
attr_reader
:model
delegate
:connection
,
to: :model
def
missing_partitions
...
...
lib/gitlab/database/partitioning/replace_table.rb
View file @
7c4f0b8d
...
...
@@ -31,6 +31,7 @@ module Gitlab
private
attr_reader
:connection
delegate
:execute
,
:quote_table_name
,
:quote_column_name
,
to: :connection
def
default_sequence
(
table
,
column
)
...
...
lib/gitlab/email/html_parser.rb
View file @
7c4f0b8d
...
...
@@ -8,6 +8,7 @@ module Gitlab
end
attr_reader
:raw_body
def
initialize
(
raw_body
)
@raw_body
=
raw_body
end
...
...
lib/gitlab/git/blame.rb
View file @
7c4f0b8d
...
...
@@ -63,6 +63,7 @@ module Gitlab
class
BlameLine
attr_accessor
:lineno
,
:oldlineno
,
:commit
,
:line
def
initialize
(
lineno
,
oldlineno
,
commit
,
line
)
@lineno
=
lineno
@oldlineno
=
oldlineno
...
...
lib/gitlab/graphql/batch_key.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module Gitlab
module
Graphql
class
BatchKey
attr_reader
:object
delegate
:hash
,
to: :object
def
initialize
(
object
,
lookahead
=
nil
,
object_name:
nil
)
...
...
lib/gitlab/insecure_key_fingerprint.rb
View file @
7c4f0b8d
...
...
@@ -10,6 +10,7 @@ module Gitlab
#
class
InsecureKeyFingerprint
attr_accessor
:key
alias_attribute
:fingerprint_md5
,
:fingerprint
#
...
...
lib/gitlab/pagination/gitaly_keyset_pager.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module Gitlab
module
Pagination
class
GitalyKeysetPager
attr_reader
:request_context
,
:project
delegate
:params
,
to: :request_context
def
initialize
(
request_context
,
project
)
...
...
lib/gitlab/pagination/keyset/cursor_based_request_context.rb
View file @
7c4f0b8d
...
...
@@ -6,6 +6,7 @@ module Gitlab
class
CursorBasedRequestContext
DEFAULT_SORT_DIRECTION
=
:desc
attr_reader
:request_context
delegate
:params
,
to: :request_context
def
initialize
(
request_context
)
...
...
lib/gitlab/pagination/keyset/header_builder.rb
View file @
7c4f0b8d
...
...
@@ -5,6 +5,7 @@ module Gitlab
module
Keyset
class
HeaderBuilder
attr_reader
:request_context
delegate
:params
,
:header
,
:request
,
to: :request_context
def
initialize
(
request_context
)
...
...
lib/gitlab/pagination/offset_pagination.rb
View file @
7c4f0b8d
...
...
@@ -4,6 +4,7 @@ module Gitlab
module
Pagination
class
OffsetPagination
<
Base
attr_reader
:request_context
delegate
:params
,
:header
,
:request
,
to: :request_context
def
initialize
(
request_context
)
...
...
lib/gitlab/prometheus/queries/base_query.rb
View file @
7c4f0b8d
...
...
@@ -5,6 +5,7 @@ module Gitlab
module
Queries
class
BaseQuery
attr_accessor
:client
delegate
:query_range
,
:query
,
:label_values
,
:series
,
to: :client
,
prefix:
true
def
raw_memory_usage_query
(
environment_slug
)
...
...
lib/sidebars/menu.rb
View file @
7c4f0b8d
...
...
@@ -15,6 +15,7 @@ module Sidebars
include
::
Sidebars
::
Concerns
::
HasPartial
attr_reader
:context
delegate
:current_user
,
:container
,
to: :@context
def
initialize
(
context
)
...
...
qa/qa/git/location.rb
View file @
7c4f0b8d
...
...
@@ -9,6 +9,7 @@ module QA
extend
Forwardable
attr_reader
:git_uri
,
:uri
def_delegators
:@uri
,
:user
,
:host
,
:path
# See: config/initializers/1_settings.rb
...
...
qa/qa/specs/runner.rb
View file @
7c4f0b8d
...
...
@@ -7,6 +7,7 @@ module QA
module
Specs
class
Runner
<
Scenario
::
Template
attr_accessor
:tty
,
:tags
,
:options
RegexMismatchError
=
Class
.
new
(
StandardError
)
DEFAULT_TEST_PATH_ARGS
=
[
'--'
,
File
.
expand_path
(
'./features'
,
__dir__
)].
freeze
...
...
spec/controllers/application_controller_spec.rb
View file @
7c4f0b8d
...
...
@@ -501,6 +501,7 @@ RSpec.describe ApplicationController do
describe
'#append_info_to_payload'
do
controller
(
described_class
)
do
attr_reader
:last_payload
urgency
:high
,
[
:foo
]
def
index
...
...
spec/models/concerns/mentionable_spec.rb
View file @
7c4f0b8d
...
...
@@ -9,6 +9,7 @@ RSpec.describe Mentionable do
include
Mentionable
attr_accessor
:project
,
:message
attr_mentionable
:message
def
author
...
...
spec/support/helpers/sorting_helper.rb
View file @
7c4f0b8d
...
...
@@ -26,6 +26,7 @@ module SortingHelper
include
Comparable
attr_reader
:value
delegate
:==
,
:eql?
,
:hash
,
to: :value
def
initialize
(
value
)
...
...
spec/validators/array_members_validator_spec.rb
View file @
7c4f0b8d
...
...
@@ -12,6 +12,7 @@ RSpec.describe ArrayMembersValidator do
include
ActiveModel
::
Model
include
ActiveModel
::
Validations
attr_accessor
:children
validates
:children
,
array_members:
{
member_class:
child_class
}
end
end
...
...
spec/validators/color_validator_spec.rb
View file @
7c4f0b8d
...
...
@@ -10,6 +10,7 @@ RSpec.describe ColorValidator do
include
ActiveModel
::
Model
include
ActiveModel
::
Validations
attr_accessor
:color
validates
:color
,
color:
true
end
.
new
end
...
...
spec/validators/cron_validator_spec.rb
View file @
7c4f0b8d
...
...
@@ -8,6 +8,7 @@ RSpec.describe CronValidator do
include
ActiveModel
::
Model
include
ActiveModel
::
Validations
attr_accessor
:cron
validates
:cron
,
cron:
true
def
cron_timezone
...
...
@@ -34,6 +35,7 @@ RSpec.describe CronValidator do
include
ActiveModel
::
Model
include
ActiveModel
::
Validations
attr_accessor
:cron_partytime
validates
:cron_partytime
,
cron:
true
end
.
new
end
...
...
spec/validators/future_date_validator_spec.rb
View file @
7c4f0b8d
...
...
@@ -8,6 +8,7 @@ RSpec.describe FutureDateValidator do
include
ActiveModel
::
Model
include
ActiveModel
::
Validations
attr_accessor
:expires_at
validates
:expires_at
,
future_date:
true
end
.
new
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment