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
951c6dd2
Commit
951c6dd2
authored
May 25, 2021
by
Piotr Skorupa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make rubocop happy
parent
17d1c421
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
rubocop/cop/usage_data/histogram_with_large_table.rb
rubocop/cop/usage_data/histogram_with_large_table.rb
+5
-5
spec/rubocop/cop/usage_data/histogram_with_large_table_spec.rb
...rubocop/cop/usage_data/histogram_with_large_table_spec.rb
+1
-1
No files found.
rubocop/cop/usage_data/histogram_with_large_table.rb
View file @
951c6dd2
...
...
@@ -36,11 +36,11 @@ module RuboCop
return
unless
Array
(
one_level_matches
).
any?
||
Array
(
two_level_matches
).
any?
if
two_level_matches
class_name
=
"
#{
two_level_matches
[
0
].
first
}
::
#{
two_level_matches
[
1
].
first
}
"
.
to_sym
else
class_name
=
one_level_matches
[
0
].
first
end
class_name
=
if
two_level_matches
"
#{
two_level_matches
[
0
].
first
}
::
#{
two_level_matches
[
1
].
first
}
"
.
to_sym
else
one_level_matches
[
0
].
first
end
if
large_table?
(
class_name
)
add_offense
(
node
,
location: :expression
,
message:
format
(
MSG
,
model_name:
class_name
))
...
...
spec/rubocop/cop/usage_data/histogram_with_large_table_spec.rb
View file @
951c6dd2
...
...
@@ -10,7 +10,7 @@ RSpec.describe RuboCop::Cop::UsageData::HistogramWithLargeTable do
let
(
:config
)
do
RuboCop
::
Config
.
new
(
'UsageData/HistogramWithLargeTable'
=>
{
'HighTrafficModels'
=>
high_traffic_models
,
'HighTrafficModels'
=>
high_traffic_models
})
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