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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
3a8128f1
Commit
3a8128f1
authored
Feb 21, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Lint/UnifiedInteger
parent
030baf70
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
20 deletions
+14
-20
.rubocop.yml
.rubocop.yml
+4
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-10
spec/lib/gitlab/metrics/method_call_spec.rb
spec/lib/gitlab/metrics/method_call_spec.rb
+1
-1
spec/lib/gitlab/metrics/metric_spec.rb
spec/lib/gitlab/metrics/metric_spec.rb
+1
-1
spec/lib/gitlab/metrics/system_spec.rb
spec/lib/gitlab/metrics/system_spec.rb
+3
-3
spec/lib/gitlab/metrics/transaction_spec.rb
spec/lib/gitlab/metrics/transaction_spec.rb
+2
-2
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+3
-3
No files found.
.rubocop.yml
View file @
3a8128f1
...
...
@@ -907,6 +907,10 @@ RSpec/RepeatedDescription:
RSpec/SubjectStub
:
Enabled
:
false
Lint/UnifiedInteger
:
Enabled
:
true
Lint/ShadowingOuterLocalVariable
:
Enabled
:
false
...
...
.rubocop_todo.yml
View file @
3a8128f1
...
...
@@ -6,16 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 10
# Cop supports --auto-correct.
Lint/UnifiedInteger
:
Exclude
:
-
'
spec/lib/gitlab/metrics/method_call_spec.rb'
-
'
spec/lib/gitlab/metrics/metric_spec.rb'
-
'
spec/lib/gitlab/metrics/system_spec.rb'
-
'
spec/lib/gitlab/metrics/transaction_spec.rb'
-
'
spec/models/repository_spec.rb'
# Offense count: 23
# Cop supports --auto-correct.
Lint/UnneededSplatExpansion
:
...
...
spec/lib/gitlab/metrics/method_call_spec.rb
View file @
3a8128f1
...
...
@@ -23,7 +23,7 @@ describe Gitlab::Metrics::MethodCall do
expect
(
metric
.
values
[
:duration
]).
to
be_a_kind_of
(
Numeric
)
expect
(
metric
.
values
[
:cpu_duration
]).
to
be_a_kind_of
(
Numeric
)
expect
(
metric
.
values
[
:call_count
]).
to
an_instance_of
(
Fixnum
)
expect
(
metric
.
values
[
:call_count
]).
to
an_instance_of
(
Integer
)
expect
(
metric
.
tags
).
to
eq
({
method:
'Foo#bar'
})
end
...
...
spec/lib/gitlab/metrics/metric_spec.rb
View file @
3a8128f1
...
...
@@ -62,7 +62,7 @@ describe Gitlab::Metrics::Metric do
end
it
'includes the timestamp'
do
expect
(
hash
[
:timestamp
]).
to
be_an_instance_of
(
Fixnum
)
expect
(
hash
[
:timestamp
]).
to
be_an_instance_of
(
Integer
)
end
end
end
...
...
spec/lib/gitlab/metrics/system_spec.rb
View file @
3a8128f1
...
...
@@ -29,19 +29,19 @@ describe Gitlab::Metrics::System do
describe
'.cpu_time'
do
it
'returns a Fixnum'
do
expect
(
described_class
.
cpu_time
).
to
be_an_instance_of
(
Fixnum
)
expect
(
described_class
.
cpu_time
).
to
be_an_instance_of
(
Integer
)
end
end
describe
'.real_time'
do
it
'returns a Fixnum'
do
expect
(
described_class
.
real_time
).
to
be_an_instance_of
(
Fixnum
)
expect
(
described_class
.
real_time
).
to
be_an_instance_of
(
Integer
)
end
end
describe
'.monotonic_time'
do
it
'returns a Fixnum'
do
expect
(
described_class
.
monotonic_time
).
to
be_an_instance_of
(
Fixnum
)
expect
(
described_class
.
monotonic_time
).
to
be_an_instance_of
(
Integer
)
end
end
end
spec/lib/gitlab/metrics/transaction_spec.rb
View file @
3a8128f1
...
...
@@ -134,7 +134,7 @@ describe Gitlab::Metrics::Transaction do
series:
'rails_transactions'
,
tags:
{
action:
'Foo#bar'
},
values:
{
duration:
0.0
,
allocated_memory:
a_kind_of
(
Numeric
)
},
timestamp:
an_instance_of
(
Fixnum
)
timestamp:
an_instance_of
(
Integer
)
}
expect
(
Gitlab
::
Metrics
).
to
receive
(
:submit_metrics
).
...
...
@@ -151,7 +151,7 @@ describe Gitlab::Metrics::Transaction do
series:
'events'
,
tags:
{
event: :meow
},
values:
{
count:
1
},
timestamp:
an_instance_of
(
Fixnum
)
timestamp:
an_instance_of
(
Integer
)
}
expect
(
Gitlab
::
Metrics
).
to
receive
(
:submit_metrics
).
...
...
spec/models/repository_spec.rb
View file @
3a8128f1
...
...
@@ -1382,13 +1382,13 @@ describe Repository, models: true do
describe
'#branch_count'
do
it
'returns the number of branches'
do
expect
(
repository
.
branch_count
).
to
be_an_instance_of
(
Fixnum
)
expect
(
repository
.
branch_count
).
to
be_an_instance_of
(
Integer
)
end
end
describe
'#tag_count'
do
it
'returns the number of tags'
do
expect
(
repository
.
tag_count
).
to
be_an_instance_of
(
Fixnum
)
expect
(
repository
.
tag_count
).
to
be_an_instance_of
(
Integer
)
end
end
...
...
@@ -1738,7 +1738,7 @@ describe Repository, models: true do
context
'with an existing repository'
do
it
'returns the commit count'
do
expect
(
repository
.
commit_count
).
to
be_an_instance_of
(
Fixnum
)
expect
(
repository
.
commit_count
).
to
be_an_instance_of
(
Integer
)
end
end
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