Commit 9e05002f authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'issue_239356_fix_Performance/DeleteSuffix' into 'master'

Resolve Performance/DeleteSuffix rubocop offenses

See merge request gitlab-org/gitlab!81344
parents 2f17bb43 fd5987e7
......@@ -278,16 +278,6 @@ Performance/DeletePrefix:
- 'spec/lib/gitlab/gfm/uploads_rewriter_spec.rb'
- 'spec/support/helpers/test_env.rb'
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: SafeMultiline.
Performance/DeleteSuffix:
Exclude:
- 'app/helpers/submodule_helper.rb'
- 'app/workers/concerns/application_worker.rb'
- 'ee/app/models/geo/upload_registry.rb'
- 'ee/app/workers/geo/file_download_dispatch_worker/attachment_job_finder.rb'
# Offense count: 121
Performance/MethodObjectAsBlock:
Enabled: false
......
......@@ -32,7 +32,7 @@ module SubmoduleHelper
namespace.sub!(%r{\A/}, '')
project.rstrip!
project.sub!(/\.git\z/, '')
project.delete_suffix!('.git')
if self_url?(url, namespace, project)
[
......
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