-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update rubocop version & fix offences (#768)
* Update Rubocop to 1.11 * Fix a bunch of offenses
- Loading branch information
1 parent
0470c5e
commit 891472d
Showing
77 changed files
with
1,415 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,136 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2016-09-09 17:05:47 +0700 using RuboCop version 0.42.0. | ||
# on 2021-03-11 12:44:08 UTC using RuboCop version 1.11.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: 42 | ||
# Offense count: 1 | ||
# Configuration parameters: Include. | ||
# Include: **/*.gemspec | ||
Gemspec/RequiredRubyVersion: | ||
Exclude: | ||
- 'chewy.gemspec' | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: AllowedMethods. | ||
# AllowedMethods: enums | ||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- 'lib/chewy.rb' | ||
- 'lib/chewy/rspec/update_index.rb' | ||
- 'spec/chewy/config_spec.rb' | ||
|
||
# Offense count: 12 | ||
# Configuration parameters: AllowComments, AllowEmptyLambdas. | ||
Lint/EmptyBlock: | ||
Exclude: | ||
- 'lib/sequel/plugins/chewy_observe.rb' | ||
- 'spec/chewy/minitest/helpers_spec.rb' | ||
- 'spec/chewy/rspec/update_index_spec.rb' | ||
- 'spec/chewy/search/scrolling_spec.rb' | ||
- 'spec/chewy/strategy/atomic_spec.rb' | ||
- 'spec/chewy/strategy_spec.rb' | ||
- 'spec/chewy/type/import/bulk_request_spec.rb' | ||
- 'spec/chewy/type/witchcraft_spec.rb' | ||
- 'spec/chewy_spec.rb' | ||
|
||
# Offense count: 3 | ||
Lint/MissingSuper: | ||
Exclude: | ||
- 'lib/chewy/strategy/atomic.rb' | ||
- 'lib/chewy/type/adapter/object.rb' | ||
- 'lib/chewy/type/adapter/orm.rb' | ||
|
||
# Offense count: 36 | ||
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes. | ||
Metrics/AbcSize: | ||
Max: 48 | ||
Max: 41 | ||
|
||
# Offense count: 4 | ||
# Configuration parameters: CountComments. | ||
# Configuration parameters: CountComments, CountAsOne. | ||
Metrics/ClassLength: | ||
Max: 300 | ||
Max: 269 | ||
|
||
# Offense count: 14 | ||
# Offense count: 13 | ||
# Configuration parameters: IgnoredMethods. | ||
Metrics/CyclomaticComplexity: | ||
Max: 13 | ||
|
||
# Offense count: 1450 | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes. | ||
# URISchemes: http, https | ||
Metrics/LineLength: | ||
Max: 198 | ||
Max: 12 | ||
|
||
# Offense count: 38 | ||
# Configuration parameters: CountComments. | ||
# Offense count: 44 | ||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. | ||
Metrics/MethodLength: | ||
Max: 33 | ||
Max: 29 | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: CountComments. | ||
# Offense count: 2 | ||
# Configuration parameters: CountComments, CountAsOne. | ||
Metrics/ModuleLength: | ||
Max: 180 | ||
Max: 174 | ||
|
||
# Offense count: 14 | ||
# Offense count: 18 | ||
# Configuration parameters: IgnoredMethods. | ||
Metrics/PerceivedComplexity: | ||
Max: 15 | ||
Max: 13 | ||
|
||
# Offense count: 93 | ||
# Offense count: 11 | ||
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers. | ||
# SupportedStyles: snake_case, normalcase, non_integer | ||
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339 | ||
Naming/VariableNumber: | ||
Exclude: | ||
- 'spec/chewy/fields/root_spec.rb' | ||
|
||
# Offense count: 5 | ||
Style/DocumentDynamicEvalDefinition: | ||
Exclude: | ||
- 'lib/chewy/index/actions.rb' | ||
- 'lib/chewy/repository.rb' | ||
- 'lib/chewy/search/pagination/kaminari.rb' | ||
- 'lib/chewy/type/crutch.rb' | ||
- 'lib/chewy/type/witchcraft.rb' | ||
|
||
# Offense count: 63 | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
# Offense count: 2 | ||
# Cop supports --auto-correct. | ||
Style/EvalWithLocation: | ||
Exclude: | ||
- 'spec/chewy/index_spec.rb' | ||
|
||
# Offense count: 208 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: always, always_true, never | ||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
# Offense count: 2 | ||
# Configuration parameters: MinBodyLength. | ||
Style/GuardClause: | ||
Exclude: | ||
- 'lib/chewy.rb' | ||
- 'spec/support/active_record.rb' | ||
|
||
# Offense count: 12 | ||
# Cop supports --auto-correct. | ||
Style/IfUnlessModifier: | ||
Exclude: | ||
- 'lib/chewy.rb' | ||
- 'lib/chewy/railtie.rb' | ||
- 'lib/chewy/rspec/update_index.rb' | ||
- 'lib/chewy/search/query_proxy.rb' | ||
- 'lib/chewy/type/adapter/mongoid.rb' | ||
- 'lib/chewy/type/adapter/sequel.rb' | ||
- 'lib/chewy/type/import.rb' | ||
- 'lib/chewy/type/witchcraft.rb' | ||
- 'spec/support/active_record.rb' | ||
|
||
# Offense count: 64 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | ||
# URISchemes: http, https | ||
Layout/LineLength: | ||
Max: 191 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gem "activerecord", "~> 5.2.0" | ||
gem "activesupport", "~> 5.2.0" | ||
gem "activejob", "~> 5.2.0" | ||
gem "resque", require: false | ||
gem "shoryuken", require: false | ||
gem "aws-sdk-sqs", require: false | ||
gem "sidekiq", require: false | ||
gem "kaminari-core", "~> 1.1.0", require: false | ||
gem "will_paginate", require: false | ||
gem "parallel", require: false | ||
gem 'activejob', '~> 5.2.0' | ||
gem 'activerecord', '~> 5.2.0' | ||
gem 'activesupport', '~> 5.2.0' | ||
gem 'aws-sdk-sqs', require: false | ||
gem 'kaminari-core', '~> 1.1.0', require: false | ||
gem 'parallel', require: false | ||
gem 'resque', require: false | ||
gem 'rspec_junit_formatter', '~> 0.4.1' | ||
gem 'shoryuken', require: false | ||
gem 'sidekiq', require: false | ||
gem 'will_paginate', require: false | ||
|
||
gemspec path: "../" | ||
gemspec path: '../' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gem "mongoid", "~> 6.4.0" | ||
gem "activesupport", "~> 5.2.0" | ||
gem "activejob", "~> 5.2.0" | ||
gem "resque", require: false | ||
gem "shoryuken", require: false | ||
gem "aws-sdk-sqs", require: false | ||
gem "sidekiq", require: false | ||
gem "kaminari-core", "~> 1.1.0", require: false | ||
gem "will_paginate", require: false | ||
gem "parallel", require: false | ||
gem 'activejob', '~> 5.2.0' | ||
gem 'activesupport', '~> 5.2.0' | ||
gem 'aws-sdk-sqs', require: false | ||
gem 'kaminari-core', '~> 1.1.0', require: false | ||
gem 'mongoid', '~> 6.4.0' | ||
gem 'parallel', require: false | ||
gem 'resque', require: false | ||
gem 'rspec_junit_formatter', '~> 0.4.1' | ||
gem 'shoryuken', require: false | ||
gem 'sidekiq', require: false | ||
gem 'will_paginate', require: false | ||
|
||
gemspec path: "../" | ||
gemspec path: '../' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gem "activerecord", "~> 6.0.0" | ||
gem "activesupport", "~> 6.0.0" | ||
gem "activejob", "~> 6.0.0" | ||
gem "resque", require: false | ||
gem "shoryuken", require: false | ||
gem "aws-sdk-sqs", require: false | ||
gem "sidekiq", require: false | ||
gem "kaminari-core", "~> 1.1.0", require: false | ||
gem "will_paginate", require: false | ||
gem "parallel", require: false | ||
gem 'activejob', '~> 6.0.0' | ||
gem 'activerecord', '~> 6.0.0' | ||
gem 'activesupport', '~> 6.0.0' | ||
gem 'aws-sdk-sqs', require: false | ||
gem 'kaminari-core', '~> 1.1.0', require: false | ||
gem 'parallel', require: false | ||
gem 'resque', require: false | ||
gem 'rspec_junit_formatter', '~> 0.4.1' | ||
gem 'shoryuken', require: false | ||
gem 'sidekiq', require: false | ||
gem 'will_paginate', require: false | ||
|
||
gemspec path: "../" | ||
gemspec path: '../' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gem "activerecord", "~> 6.1.0" | ||
gem "activesupport", "~> 6.1.0" | ||
gem "activejob", "~> 6.1.0" | ||
gem "resque", require: false | ||
gem "shoryuken", require: false | ||
gem "aws-sdk-sqs", require: false | ||
gem "sidekiq", require: false | ||
gem "kaminari-core", "~> 1.1.0", require: false | ||
gem "will_paginate", require: false | ||
gem "parallel", require: false | ||
gem 'activejob', '~> 6.1.0' | ||
gem 'activerecord', '~> 6.1.0' | ||
gem 'activesupport', '~> 6.1.0' | ||
gem 'aws-sdk-sqs', require: false | ||
gem 'kaminari-core', '~> 1.1.0', require: false | ||
gem 'parallel', require: false | ||
gem 'resque', require: false | ||
gem 'rspec_junit_formatter', '~> 0.4.1' | ||
gem 'shoryuken', require: false | ||
gem 'sidekiq', require: false | ||
gem 'will_paginate', require: false | ||
|
||
gem 'rexml' if RUBY_VERSION >= '3.0.0' | ||
|
||
gemspec path: "../" | ||
gemspec path: '../' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gem "sequel", "~> 4.45.0" | ||
gem "activesupport", "~> 5.1.0" | ||
gem "kaminari-core", "~> 1.1.0", require: false | ||
gem "will_paginate", require: false | ||
gem "parallel", require: false | ||
gem 'activesupport', '~> 5.1.0' | ||
gem 'kaminari-core', '~> 1.1.0', require: false | ||
gem 'parallel', require: false | ||
gem 'sequel', '~> 4.45.0' | ||
gem 'will_paginate', require: false | ||
|
||
gemspec path: "../" | ||
gemspec path: '../' |
Oops, something went wrong.