diff --git a/.rubocop_todo/layout/line_continuation_spacing.yml b/.rubocop_todo/layout/line_continuation_spacing.yml index 6dc72856119d30d08b2c943b5fdbe8c061f975d5..ac862a01a2a0a82835f16b7c347cd80fe8b6a812 100644 --- a/.rubocop_todo/layout/line_continuation_spacing.yml +++ b/.rubocop_todo/layout/line_continuation_spacing.yml @@ -2,26 +2,6 @@ # Cop supports --autocorrect. Layout/LineContinuationSpacing: Exclude: - - 'app/helpers/tags_helper.rb' - - 'app/helpers/tree_helper.rb' - - 'app/models/concerns/spammable.rb' - - 'app/services/merge_requests/merge_service.rb' - - 'app/services/users/email_verification/validate_token_service.rb' - - 'ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb' - - 'ee/app/graphql/mutations/requirements_management/export_requirements.rb' - - 'ee/app/graphql/mutations/security_policy/assign_security_policy_project.rb' - - 'ee/app/graphql/resolvers/security_orchestration/scan_execution_policy_resolver.rb' - - 'ee/app/graphql/resolvers/vulnerabilities_resolver.rb' - - 'ee/app/graphql/resolvers/vulnerability_severities_count_resolver.rb' - - 'ee/app/graphql/types/requirements_management/requirement_type.rb' - - 'ee/app/helpers/push_rules_helper.rb' - - 'ee/app/models/ee/epic.rb' - - 'ee/app/models/ee/group_group_link.rb' - - 'ee/app/models/ee/project_group_link.rb' - - 'ee/app/models/incident_management/oncall_shift.rb' - - 'ee/app/services/audit_events/protected_branch_audit_event_service.rb' - - 'ee/app/services/boards/epic_lists/destroy_service.rb' - - 'ee/app/services/group_saml/saml_group_links/create_service.rb' - 'ee/app/services/phone_verification/telesign_client/base_service.rb' - 'ee/app/services/phone_verification/telesign_client/risk_score_service.rb' - 'ee/app/services/phone_verification/users/verify_code_service.rb' diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index 6a1e3a60a5cf2c51dd85f1ca4c9251825b639b10..07866f972001c03dc8c8dba21316d9cb54088c47 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -14,7 +14,7 @@ def protected_tag?(project, tag) end def tag_description_help_text - text = s_('TagsPage|Optionally, add a message to the tag. Leaving this blank creates '\ + text = s_('TagsPage|Optionally, add a message to the tag. Leaving this blank creates ' \ 'a %{link_start}lightweight tag.%{link_end}') % { link_start: '', diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index a4071c4be9302bf2e126077b450d9797c4e44b7c..c6d2b91ed1cd89441df5ab47d4e19690a924d7df 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -51,12 +51,12 @@ def patch_branch_name(ref) end def edit_in_new_fork_notice_now - _("You're not allowed to make changes to this project directly. "\ + _("You're not allowed to make changes to this project directly. " \ "A fork of this project is being created that you can make changes in, so you can submit a merge request.") end def edit_in_new_fork_notice - _("You're not allowed to make changes to this project directly. "\ + _("You're not allowed to make changes to this project directly. " \ "A fork of this project has been created that you can make changes in, so you can submit a merge request.") end diff --git a/app/models/concerns/spammable.rb b/app/models/concerns/spammable.rb index 5986f8f5b5fb872c87eaebf20f6efa5178e978f7..1af5f28176e0c7590bdfd77fd6862d31956178a1 100644 --- a/app/models/concerns/spammable.rb +++ b/app/models/concerns/spammable.rb @@ -88,13 +88,13 @@ def invalidate_if_spam end def recaptcha_error! - self.errors.add(:base, _("Your %{spammable_entity_type} has been recognized as spam. "\ + self.errors.add(:base, _("Your %{spammable_entity_type} has been recognized as spam. " \ "Please, change the content or solve the reCAPTCHA to proceed.") \ % { spammable_entity_type: spammable_entity_type }) end def unrecoverable_spam_error! - self.errors.add(:base, _("Your %{spammable_entity_type} has been recognized as spam. "\ + self.errors.add(:base, _("Your %{spammable_entity_type} has been recognized as spam. " \ "Please, change the content to proceed.") \ % { spammable_entity_type: spammable_entity_type }) end diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb index 44704ad9eb7b14102c50fec6df32dbadf378a488..501d6b0aced09b76ba7f7f10d45c9a96599c9e56 100644 --- a/app/services/merge_requests/merge_service.rb +++ b/app/services/merge_requests/merge_service.rb @@ -62,7 +62,7 @@ def validate_strategy! def updated_check! unless source_matches? - raise_error('Branch has been updated since the merge was requested. '\ + raise_error('Branch has been updated since the merge was requested. ' \ 'Please review the changes.') end end diff --git a/app/services/users/email_verification/validate_token_service.rb b/app/services/users/email_verification/validate_token_service.rb index 30413de805c851440ce459f258010beec565ddc9..7aa129f0bc19a55c9e9c696e777be56c1d02639c 100644 --- a/app/services/users/email_verification/validate_token_service.rb +++ b/app/services/users/email_verification/validate_token_service.rb @@ -59,7 +59,7 @@ def failure(reason) def failure_message(reason) case reason when :rate_limited - format(s_("IdentityVerification|You've reached the maximum amount of tries. "\ + format(s_("IdentityVerification|You've reached the maximum amount of tries. " \ 'Wait %{interval} or send a new code and try again.'), interval: email_verification_interval) when :expired s_('IdentityVerification|The code has expired. Send a new code and try again.') diff --git a/ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb b/ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb index 487be1db9c608a860aec5bbd3c4983192bbd5e71..c76d9f22995074acef27e0d27b582f5e261487e2 100644 --- a/ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb +++ b/ee/app/controllers/ee/ldap/omniauth_callbacks_controller.rb @@ -32,7 +32,7 @@ def enqueue_after_sign_in_workers(user, auth_user) end def show_ldap_sync_flash - flash[:notice] = _('LDAP sync in progress. This could take a few minutes. '\ + flash[:notice] = _('LDAP sync in progress. This could take a few minutes. ' \ 'Refresh the page to see the changes.') end end diff --git a/ee/app/graphql/mutations/requirements_management/export_requirements.rb b/ee/app/graphql/mutations/requirements_management/export_requirements.rb index dcd3d58464ed34410ed0844bfeace2eb42ee49ba..26e7e9a9c4b6c4358e59d5daa5ac18f5752980ff 100644 --- a/ee/app/graphql/mutations/requirements_management/export_requirements.rb +++ b/ee/app/graphql/mutations/requirements_management/export_requirements.rb @@ -24,8 +24,8 @@ def ready?(**args) invalid_fields = export_service.invalid_fields if invalid_fields.any? - message = "The following fields are incorrect: #{invalid_fields.join(', ')}. "\ - "See https://docs.gitlab.com/ee/user/project/requirements/#exported-csv-file-format "\ + message = "The following fields are incorrect: #{invalid_fields.join(', ')}. " \ + "See https://docs.gitlab.com/ee/user/project/requirements/#exported-csv-file-format " \ "for permitted fields." raise Gitlab::Graphql::Errors::ArgumentError, message end diff --git a/ee/app/graphql/mutations/security_policy/assign_security_policy_project.rb b/ee/app/graphql/mutations/security_policy/assign_security_policy_project.rb index c83e7c8aa382750420db9011798de535879ee5f1..e9b80467e845134fcd1b9176136e0b3d4f864c6b 100644 --- a/ee/app/graphql/mutations/security_policy/assign_security_policy_project.rb +++ b/ee/app/graphql/mutations/security_policy/assign_security_policy_project.rb @@ -4,8 +4,8 @@ module Mutations module SecurityPolicy class AssignSecurityPolicyProject < BaseMutation graphql_name 'SecurityPolicyProjectAssign' - description 'Assigns the specified project(`security_policy_project_id`) as security policy project '\ - 'for the given project(`full_path`). If the project already has a security policy project, '\ + description 'Assigns the specified project(`security_policy_project_id`) as security policy project ' \ + 'for the given project(`full_path`). If the project already has a security policy project, ' \ 'this reassigns the project\'s security policy project with the given `security_policy_project_id`' include FindsProjectOrGroupForSecurityPolicies diff --git a/ee/app/graphql/resolvers/security_orchestration/scan_execution_policy_resolver.rb b/ee/app/graphql/resolvers/security_orchestration/scan_execution_policy_resolver.rb index ad031ba57ba4c59a0179c84987e0ecb3f28ca54a..33d5f9ed2dc26b01387a0388cad24af89173b33f 100644 --- a/ee/app/graphql/resolvers/security_orchestration/scan_execution_policy_resolver.rb +++ b/ee/app/graphql/resolvers/security_orchestration/scan_execution_policy_resolver.rb @@ -9,7 +9,7 @@ class ScanExecutionPolicyResolver < BaseResolver type Types::SecurityOrchestration::ScanExecutionPolicyType, null: true argument :action_scan_types, [::Types::Security::ReportTypeEnum], - description: "Filters policies by the action scan type. "\ + description: "Filters policies by the action scan type. " \ "Only these scan types are supported: #{::Security::ScanExecutionPolicy::SCAN_TYPES.map { |type| "`#{type}`" }.join(', ')}.", required: false diff --git a/ee/app/graphql/resolvers/vulnerabilities_resolver.rb b/ee/app/graphql/resolvers/vulnerabilities_resolver.rb index 0cec4a2e0c5b37dec8be1bdddde6e80aeb757607..5c1dffd0503d42a2f58b6a9628b5921ae6d833aa 100644 --- a/ee/app/graphql/resolvers/vulnerabilities_resolver.rb +++ b/ee/app/graphql/resolvers/vulnerabilities_resolver.rb @@ -76,20 +76,20 @@ class VulnerabilitiesResolver < VulnerabilitiesBaseResolver argument :image, [GraphQL::Types::String], required: false, - description: "Filter vulnerabilities by location image. When this filter is present, "\ - "the response only matches entries for a `reportType` "\ + description: "Filter vulnerabilities by location image. When this filter is present, " \ + "the response only matches entries for a `reportType` " \ "that includes #{::Vulnerabilities::Finding::REPORT_TYPES_WITH_LOCATION_IMAGE.map { |type| "`#{type}`" }.join(', ')}." argument :cluster_id, [::Types::GlobalIDType[::Clusters::Cluster]], prepare: ->(ids, _) { ids.map(&:model_id) }, required: false, - description: "Filter vulnerabilities by `cluster_id`. Vulnerabilities with a `reportType` "\ + description: "Filter vulnerabilities by `cluster_id`. Vulnerabilities with a `reportType` " \ "of `cluster_image_scanning` are only included with this filter." argument :cluster_agent_id, [::Types::GlobalIDType[::Clusters::Agent]], prepare: ->(ids, _) { ids.map(&:model_id) }, required: false, - description: "Filter vulnerabilities by `cluster_agent_id`. Vulnerabilities with a `reportType` "\ + description: "Filter vulnerabilities by `cluster_agent_id`. Vulnerabilities with a `reportType` " \ "of `cluster_image_scanning` are only included with this filter." argument :dismissal_reason, [Types::Vulnerabilities::DismissalReasonEnum], diff --git a/ee/app/graphql/resolvers/vulnerability_severities_count_resolver.rb b/ee/app/graphql/resolvers/vulnerability_severities_count_resolver.rb index f764901eb05041968763feacb5d998d5ecf59892..f3ca4d28e1d00c5053d681033929256dfb3551f0 100644 --- a/ee/app/graphql/resolvers/vulnerability_severities_count_resolver.rb +++ b/ee/app/graphql/resolvers/vulnerability_severities_count_resolver.rb @@ -63,14 +63,14 @@ class VulnerabilitySeveritiesCountResolver < VulnerabilitiesBaseResolver argument :image, [GraphQL::Types::String], required: false, - description: "Filter vulnerabilities by location image. When this filter is present, "\ - "the response only matches entries for a `reportType` "\ + description: "Filter vulnerabilities by location image. When this filter is present, " \ + "the response only matches entries for a `reportType` " \ "that includes #{::Vulnerabilities::Finding::REPORT_TYPES_WITH_LOCATION_IMAGE.map { |type| "`#{type}`" }.join(', ')}." argument :cluster_agent_id, [::Types::GlobalIDType[::Clusters::Agent]], prepare: ->(ids, _) { ids.map(&:model_id) }, required: false, - description: "Filter vulnerabilities by `cluster_agent_id`. Vulnerabilities with a `reportType` "\ + description: "Filter vulnerabilities by `cluster_agent_id`. Vulnerabilities with a `reportType` " \ "of `cluster_image_scanning` are only included with this filter." argument :has_merge_request, GraphQL::Types::Boolean, diff --git a/ee/app/graphql/types/requirements_management/requirement_type.rb b/ee/app/graphql/types/requirements_management/requirement_type.rb index 41f1114e69366849c59a889cbfe7f1723b704b4b..347c9a38ce9296e7d92d3c53a9b2e1433a9c4d7c 100644 --- a/ee/app/graphql/types/requirements_management/requirement_type.rb +++ b/ee/app/graphql/types/requirements_management/requirement_type.rb @@ -17,7 +17,7 @@ class RequirementType < BaseObject deprecated: { reason: 'Use work_item_iid instead', milestone: '15.8' } field :work_item_iid, GraphQL::Types::String, null: false, - description: 'Work item IID of the requirement, '\ + description: 'Work item IID of the requirement, ' \ 'will replace current IID as identifier soon.' field :title, GraphQL::Types::String, null: true, description: 'Title of the requirement.' diff --git a/ee/app/helpers/push_rules_helper.rb b/ee/app/helpers/push_rules_helper.rb index e2368cf734c2b6c85fb9727deaf5c03884dd5245..93d307e7e0cc036866072ff168f249200cd2bf26 100644 --- a/ee/app/helpers/push_rules_helper.rb +++ b/ee/app/helpers/push_rules_helper.rb @@ -18,14 +18,14 @@ def reject_non_dco_commits_description(push_rule) end def commit_committer_check_description(push_rule) - message = s_("ProjectSettings|Users can only push commits to this repository "\ + message = s_("ProjectSettings|Users can only push commits to this repository " \ "if the committer email is one of their own verified emails.") push_rule_update_description(message, push_rule, :commit_committer_check) end def commit_committer_name_check_description(push_rule) - message = s_("ProjectSettings|Users can only push commits to this repository "\ + message = s_("ProjectSettings|Users can only push commits to this repository " \ "if the commit author name is consistent with their GitLab account name.") push_rule_update_description(message, push_rule, :commit_committer_name_check) diff --git a/ee/app/models/ee/epic.rb b/ee/app/models/ee/epic.rb index 5b5ca933c7891aacad50b4689e54c4455d24c896..46154503cdd4e431267bab4a14736652764ed6bd 100644 --- a/ee/app/models/ee/epic.rb +++ b/ee/app/models/ee/epic.rb @@ -791,7 +791,7 @@ def validate_parent_epic elsif level_depth_exceeded?(parent) errors.add(:parent, format( - _('This epic cannot be added. One or more epics would exceed the maximum '\ + _('This epic cannot be added. One or more epics would exceed the maximum ' \ "depth (%{max_depth}) from its most distant ancestor."), max_depth: MAX_HIERARCHY_DEPTH ) diff --git a/ee/app/models/ee/group_group_link.rb b/ee/app/models/ee/group_group_link.rb index 540a651d9f6a26c27fbc5ce8eb15cf31719651c5..97e5e8d119dd3189e8f85ed6d59f88f1a4933a58 100644 --- a/ee/app/models/ee/group_group_link.rb +++ b/ee/app/models/ee/group_group_link.rb @@ -38,8 +38,8 @@ def group_with_allowed_email_domains shared_with_group_domains = shared_with_group.root_ancestor_allowed_email_domains.pluck(:domain).to_set if shared_with_group_domains.empty? || !shared_with_group_domains.subset?(shared_group_domains) - errors.add(:group_id, _("Invited group allowed email domains must contain a subset of the allowed "\ - "email domains of the root ancestor group. Go to the group's 'Settings > General' page "\ + errors.add(:group_id, _("Invited group allowed email domains must contain a subset of the allowed " \ + "email domains of the root ancestor group. Go to the group's 'Settings > General' page " \ "and check 'Restrict membership by email domain'.")) end end diff --git a/ee/app/models/ee/project_group_link.rb b/ee/app/models/ee/project_group_link.rb index a711483b8d8bac1388ada5fb1bdbb2820845bade..8f6a709b83ac4e96a3e41b6093ff33c592ff9e4a 100644 --- a/ee/app/models/ee/project_group_link.rb +++ b/ee/app/models/ee/project_group_link.rb @@ -45,8 +45,8 @@ def group_with_allowed_email_domains if shared_with_group_domains.empty? || !shared_with_group_domains.subset?(root_ancestor_group_domains) errors.add( :group_id, - _("Invited group allowed email domains must contain a subset of the allowed email domains "\ - "of the root ancestor group. Go to the group's 'Settings > General' page "\ + _("Invited group allowed email domains must contain a subset of the allowed email domains " \ + "of the root ancestor group. Go to the group's 'Settings > General' page " \ "and check 'Restrict membership by email domain'.")) end end diff --git a/ee/app/models/incident_management/oncall_shift.rb b/ee/app/models/incident_management/oncall_shift.rb index aa3ea7f7b5be1020197fc12c6cae318c787e1904..b7dc0ea9937581c8703d5b883d1efd26f7553e47 100644 --- a/ee/app/models/incident_management/oncall_shift.rb +++ b/ee/app/models/incident_management/oncall_shift.rb @@ -22,7 +22,7 @@ class OncallShift < ApplicationRecord where("tstzrange(starts_at, ends_at, '[)') && tstzrange(?, ?, '[)')", starts_at, ends_at) end scope :for_timestamp, ->(timestamp) do - where('incident_management_oncall_shifts.starts_at <= :timestamp AND '\ + where('incident_management_oncall_shifts.starts_at <= :timestamp AND ' \ 'incident_management_oncall_shifts.ends_at > :timestamp', timestamp: timestamp) end diff --git a/ee/app/services/audit_events/protected_branch_audit_event_service.rb b/ee/app/services/audit_events/protected_branch_audit_event_service.rb index e9ee1f864792bb1bb73141a0a5575405d7ee0b03..be7f8c4559c75e7bf721930d860043f903692ddf 100644 --- a/ee/app/services/audit_events/protected_branch_audit_event_service.rb +++ b/ee/app/services/audit_events/protected_branch_audit_event_service.rb @@ -40,10 +40,10 @@ def event_type def message case @action when :add - "Added protected branch with ["\ - "allowed to push: #{@protected_branch.push_access_levels.map(&:humanize)}, "\ - "allowed to merge: #{@protected_branch.merge_access_levels.map(&:humanize)}, "\ - "allow force push: #{@protected_branch.allow_force_push}, "\ + "Added protected branch with [" \ + "allowed to push: #{@protected_branch.push_access_levels.map(&:humanize)}, " \ + "allowed to merge: #{@protected_branch.merge_access_levels.map(&:humanize)}, " \ + "allow force push: #{@protected_branch.allow_force_push}, " \ "code owner approval required: #{@protected_branch.code_owner_approval_required}]" when :remove "Unprotected branch" diff --git a/ee/app/services/boards/epic_lists/destroy_service.rb b/ee/app/services/boards/epic_lists/destroy_service.rb index c14a91eb84f5ab8215f7c5f655149d1c01cca30d..fb28b3213d18e23b88c7362df6fa78d0db75e973 100644 --- a/ee/app/services/boards/epic_lists/destroy_service.rb +++ b/ee/app/services/boards/epic_lists/destroy_service.rb @@ -12,7 +12,7 @@ def execute(list) end unless can?(current_user, :admin_epic_board_list, list) - return ServiceResponse.error(message: 'The epic board list that you are attempting to destroy does not '\ + return ServiceResponse.error(message: 'The epic board list that you are attempting to destroy does not ' \ 'exist or you don\'t have permission to perform this action') end diff --git a/ee/app/services/group_saml/saml_group_links/create_service.rb b/ee/app/services/group_saml/saml_group_links/create_service.rb index fb72816bcd818b9049ad5a0da89abff92a098c34..3658b8a8550567663f5222dfcabbadf276ea64e3 100644 --- a/ee/app/services/group_saml/saml_group_links/create_service.rb +++ b/ee/app/services/group_saml/saml_group_links/create_service.rb @@ -47,7 +47,7 @@ def error end def create_audit_event - message = 'SAML group links created. Group Name - %{group_name}, '\ + message = 'SAML group links created. Group Name - %{group_name}, ' \ 'Access Level - %{access_level}' % { group_name: saml_group_link.saml_group_name, access_level: saml_group_link.access_level }