Skip to content

Commit

Permalink
Fix rubocop offences
Browse files Browse the repository at this point in the history
  • Loading branch information
mscrivo committed Jul 1, 2023
1 parent fc10f59 commit 417ff32
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 14 additions & 9 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 5000`
# on 2023-05-27 20:47:15 UTC using RuboCop version 1.50.2.
# on 2023-07-01 15:43:53 UTC using RuboCop version 1.50.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -100,6 +100,12 @@ Lint/MissingSuper:
- 'lib/grape/router/pattern.rb'
- 'lib/grape/validations/validators/base.rb'

# Offense count: 1
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Exclude:
- 'lib/grape/endpoint.rb'

# Offense count: 2
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
Expand Down Expand Up @@ -134,7 +140,7 @@ RSpec/AnyInstance:
- 'spec/grape/api_spec.rb'
- 'spec/grape/middleware/base_spec.rb'

# Offense count: 342
# Offense count: 343
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Expand Down Expand Up @@ -324,7 +330,7 @@ RSpec/MessageChain:
Exclude:
- 'spec/grape/middleware/formatter_spec.rb'

# Offense count: 136
# Offense count: 147
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Expand All @@ -335,7 +341,7 @@ RSpec/MissingExampleGroupArgument:
Exclude:
- 'spec/grape/middleware/exception_spec.rb'

# Offense count: 765
# Offense count: 772
# Configuration parameters: Max.
RSpec/MultipleExpectations:
Exclude:
Expand Down Expand Up @@ -413,7 +419,7 @@ RSpec/MultipleMemoizedHelpers:
- 'spec/grape/request_spec.rb'
- 'spec/grape/validations/attributes_doc_spec.rb'

# Offense count: 2137
# Offense count: 2150
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Expand Down Expand Up @@ -478,7 +484,7 @@ RSpec/NamedSubject:
- 'spec/grape/validations/validators/presence_spec.rb'
- 'spec/grape/validations_spec.rb'

# Offense count: 174
# Offense count: 173
# Configuration parameters: Max, AllowedGroups.
RSpec/NestedGroups:
Exclude:
Expand Down Expand Up @@ -527,11 +533,10 @@ RSpec/RepeatedDescription:
- 'spec/grape/validations/validators/allow_blank_spec.rb'
- 'spec/grape/validations/validators/values_spec.rb'

# Offense count: 10
# Offense count: 8
RSpec/RepeatedExample:
Exclude:
- 'spec/grape/api_spec.rb'
- 'spec/grape/dsl/request_response_spec.rb'
- 'spec/grape/middleware/versioner/accept_version_header_spec.rb'
- 'spec/grape/validations/validators/allow_blank_spec.rb'

Expand Down Expand Up @@ -559,7 +564,7 @@ RSpec/StubbedMock:
- 'spec/grape/middleware/formatter_spec.rb'
- 'spec/grape/parser_spec.rb'

# Offense count: 114
# Offense count: 122
RSpec/SubjectStub:
Exclude:
- 'spec/grape/api_spec.rb'
Expand Down
2 changes: 0 additions & 2 deletions lib/grape/endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ def run
end
end

# rubocop:disable Metrics/MethodLength
def build_stack(helpers)
stack = Grape::Middleware::Stack.new

Expand Down Expand Up @@ -317,7 +316,6 @@ def build_stack(helpers)
builder.run ->(env) { env[Grape::Env::API_ENDPOINT].run }
builder.to_app
end
# rubocop:enable Metrics/MethodLength

def build_helpers
helpers = namespace_stackable(:helpers)
Expand Down

0 comments on commit 417ff32

Please sign in to comment.