Skip to content

Commit

Permalink
Fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
ellnix committed Nov 29, 2023
1 parent 9fb7251 commit 967ccb2
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 12 deletions.
98 changes: 87 additions & 11 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-11-01 17:06:53 UTC using RuboCop version 1.27.0.
# on 2023-11-29 09:36:55 UTC using RuboCop version 1.27.0.
# 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
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
Bundler/OrderedGems:
Exclude:
- 'Gemfile'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: Include.
# Include: **/*.gemspec
Gemspec/RequireMFA:
Exclude:
- 'meilisearch-rails.gemspec'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle.
Expand All @@ -14,6 +30,15 @@ Layout/EmptyLinesAroundModuleBody:
Exclude:
- 'lib/meilisearch-rails.rb'

# Offense count: 3
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: symmetrical, new_line, same_line
Layout/MultilineMethodCallBraceLayout:
Exclude:
- 'spec/integration_spec.rb'
- 'spec/ms_clean_up_job_spec.rb'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle, IndentationWidth.
Expand All @@ -28,6 +53,13 @@ Lint/SuppressedException:
Exclude:
- 'lib/meilisearch-rails.rb'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Exclude:
- 'lib/meilisearch-rails.rb'

# Offense count: 2
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
Expand All @@ -38,7 +70,7 @@ Lint/UnusedMethodArgument:
# Offense count: 10
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 102
Max: 104

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
Expand All @@ -59,17 +91,17 @@ Metrics/CyclomaticComplexity:
# Offense count: 16
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
Metrics/MethodLength:
Max: 99
Max: 103

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ModuleLength:
Max: 428
Max: 443

# Offense count: 9
# Configuration parameters: IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 33
Max: 34

# Offense count: 1
Naming/AccessorMethodName:
Expand All @@ -91,7 +123,7 @@ Naming/MethodParameterName:
Exclude:
- 'lib/meilisearch-rails.rb'

# Offense count: 15
# Offense count: 20
RSpec/BeforeAfterAll:
Exclude:
- 'spec/integration_spec.rb'
Expand All @@ -102,20 +134,27 @@ RSpec/DescribeClass:
Exclude:
- 'spec/integration_spec.rb'

# Offense count: 36
# Offense count: 45
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 19

# Offense count: 2
# Offense count: 3
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
Exclude:
- 'spec/configuration_spec.rb'
- 'spec/settings_spec_2.rb'
- 'spec/utilities_spec.rb'

# Offense count: 26
# Offense count: 2
# This cop supports safe auto-correction (--auto-correct).
RSpec/Focus:
Exclude:
- 'spec/settings_spec_2.rb'

# Offense count: 25
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
Expand All @@ -133,6 +172,12 @@ RSpec/MultipleDescribes:
Exclude:
- 'spec/integration_spec.rb'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
RSpec/MultipleSubjects:
Exclude:
- 'spec/ms_clean_up_job_spec.rb'

# Offense count: 1
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Expand Down Expand Up @@ -171,7 +216,21 @@ Style/InverseMethods:
Exclude:
- 'lib/meilisearch-rails.rb'

# Offense count: 8
# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
Style/MultilineIfModifier:
Exclude:
- 'lib/meilisearch-rails.rb'

# Offense count: 1
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowedMethods.
# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
Style/NestedParenthesizedCalls:
Exclude:
- 'spec/ms_clean_up_job_spec.rb'

# Offense count: 9
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
Expand All @@ -184,7 +243,24 @@ Style/RescueModifier:
Exclude:
- 'lib/meilisearch-rails.rb'

# Offense count: 21
# Offense count: 13
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'spec/integration_spec.rb'
- 'spec/ms_clean_up_job_spec.rb'

# Offense count: 2
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArguments:
Exclude:
- 'spec/integration_spec.rb'

# Offense count: 20
# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# Required for running background jobs on demand (deterministically)
ActiveJob::Base.queue_adapter = :test
# Required for serializing objects in similar to production environments
GlobalID.app = "meilisearch-test"
GlobalID.app = 'meilisearch-test'

OLD_RAILS = Gem.loaded_specs['rails'].version < Gem::Version.new('4.0')
NEW_RAILS = Gem.loaded_specs['rails'].version >= Gem::Version.new('6.0')
Expand Down

0 comments on commit 967ccb2

Please sign in to comment.