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
fd5987e7
Commit
fd5987e7
authored
Feb 23, 2022
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve Performance/DeleteSuffix rubocop offenses
Changelog: other
parent
98fa61ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
11 deletions
+1
-11
.rubocop_todo.yml
.rubocop_todo.yml
+0
-10
app/helpers/submodule_helper.rb
app/helpers/submodule_helper.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
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
...
...
app/helpers/submodule_helper.rb
View file @
fd5987e7
...
...
@@ -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
)
[
...
...
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