Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
e762a14c
Unverified
Commit
e762a14c
authored
2 years ago
by
Nick Schonning
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Enable Rubocop Performance/DeleteSuffix (#24077)
parent
f432db7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.rubocop_todo.yml
+0
-7
0 additions, 7 deletions
.rubocop_todo.yml
lib/tasks/repo.rake
+2
-2
2 additions, 2 deletions
lib/tasks/repo.rake
with
2 additions
and
9 deletions
.rubocop_todo.yml
+
0
−
7
View file @
e762a14c
...
...
@@ -301,13 +301,6 @@ Performance/DeletePrefix:
-
'
app/services/resolve_account_service.rb'
-
'
app/services/tag_search_service.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SafeMultiline.
Performance/DeleteSuffix
:
Exclude
:
-
'
lib/tasks/repo.rake'
# Offense count: 19
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/MapCompact
:
...
...
This diff is collapsed.
Click to expand it.
lib/tasks/repo.rake
+
2
−
2
View file @
e762a14c
...
...
@@ -91,8 +91,8 @@ namespace :repo do
missing_json_files
=
I18n
.
available_locales
.
reject
{
|
locale
|
Rails
.
root
.
join
(
'app'
,
'javascript'
,
'mastodon'
,
'locales'
,
"
#{
locale
}
.json"
).
exist?
}
locales_in_files
=
Dir
[
Rails
.
root
.
join
(
'config'
,
'locales'
,
'*.yml'
)].
map
do
|
path
|
file_name
=
File
.
basename
(
path
)
file_name
.
gsub
(
/\A(doorkeeper|devise|activerecord|simple_form)\./
,
''
).
gsub
(
/\.yml\z/
,
''
).
to_sym
file_name
=
File
.
basename
(
path
,
'.yml'
)
file_name
.
gsub
(
/\A(doorkeeper|devise|activerecord|simple_form)\./
,
''
).
to_sym
end
.
uniq
.
compact
missing_available_locales
=
locales_in_files
-
I18n
.
available_locales
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment