Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #388 from sul-dlss/update-rubocop
Browse files Browse the repository at this point in the history
Update rubocop to 0.60.0
  • Loading branch information
mjgiarlo committed Nov 28, 2018
2 parents 383ea98 + 1b5a6d1 commit b87d3f3
Show file tree
Hide file tree
Showing 49 changed files with 278 additions and 197 deletions.
124 changes: 56 additions & 68 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-05-18 08:42:26 -0500 using RuboCop version 0.56.0.
# on 2018-11-28 16:13:16 -0600 using RuboCop version 0.60.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: 3
# Cop supports --auto-correct.
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
Bundler/OrderedGems:
Exclude:
- 'Gemfile'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
# Include: **/*.gemspec
Gemspec/OrderedDependencies:
Exclude:
Expand All @@ -27,14 +27,12 @@ Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/models/concerns/processable_spec.rb'

# Offense count: 5
# Offense count: 3
Lint/AmbiguousOperator:
Exclude:
- 'lib/dor-services.rb'
- 'lib/dor/config.rb'
- 'lib/dor/models/concerns/describable.rb'
- 'lib/dor/models/concerns/eventable.rb'
- 'lib/dor/models/workflow_object.rb'

# Offense count: 2
# Configuration parameters: AllowSafeAssignment.
Expand All @@ -52,9 +50,9 @@ Lint/DeprecatedClassMethods:
# Offense count: 6
Lint/HandleExceptions:
Exclude:
- 'lib/dor/indexers/processable_indexer.rb'
- 'lib/dor/models/concerns/contentable.rb'
- 'lib/dor/models/concerns/processable.rb'
- 'lib/dor/indexers/processable_indexer.rb'
- 'script/console'
- 'script/manual_integration.rb'
- 'spec/support/foxml_helper.rb'
Expand Down Expand Up @@ -87,12 +85,7 @@ Lint/ShadowedArgument:
Exclude:
- 'lib/dor/datastreams/embargo_metadata_ds.rb'

# Offense count: 1
Lint/SplatKeywordArguments:
Exclude:
- 'lib/dor/models/concerns/describable.rb'

# Offense count: 22
# Offense count: 23
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Expand All @@ -108,7 +101,7 @@ Lint/UnusedBlockArgument:
- 'spec/services/digital_stacks_service_spec.rb'
- 'spec/support/foxml_helper.rb'

# Offense count: 10
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
Lint/UnusedMethodArgument:
Expand All @@ -121,7 +114,6 @@ Lint/UnusedMethodArgument:
- 'lib/dor/services/sdr_ingest_service.rb'
- 'lib/dor/services/search_service.rb'
- 'lib/dor/workflow/document.rb'
- 'lib/dor/workflow/graph.rb'
- 'spec/services/metadata_service_spec.rb'

# Offense count: 2
Expand All @@ -142,35 +134,34 @@ Lint/Void:
Exclude:
- 'lib/dor/models/concerns/identifiable.rb'

# Offense count: 87
# Offense count: 85
Metrics/AbcSize:
Max: 131
Max: 129

# Offense count: 168
# Offense count: 179
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Exclude:
- 'spec/**/*'
Max: 50
Max: 542

# Offense count: 11
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 254
Max: 253

# Offense count: 19
Metrics/CyclomaticComplexity:
Max: 25

# Offense count: 87
# Configuration parameters: CountComments.
# Offense count: 84
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 75

# Offense count: 8
# Offense count: 7
# Configuration parameters: CountComments.
Metrics/ModuleLength:
Max: 275
Max: 265

# Offense count: 2
# Configuration parameters: CountKeywordArgs.
Expand All @@ -181,17 +172,16 @@ Metrics/ParameterLists:
Metrics/PerceivedComplexity:
Max: 25

# Offense count: 9
# Offense count: 8
Naming/AccessorMethodName:
Exclude:
- 'lib/dor/datastreams/rights_metadata_ds.rb'
- 'lib/dor/models/concerns/describable.rb'
- 'lib/dor/models/concerns/governable.rb'
- 'lib/dor/models/concerns/releaseable.rb'
- 'lib/dor/models/concerns/shelvable.rb'
- 'lib/dor/workflow/graph.rb'

# Offense count: 12
# Offense count: 14
# Configuration parameters: EnforcedStyle.
# SupportedStyles: lowercase, uppercase
Naming/HeredocDelimiterCase:
Expand Down Expand Up @@ -245,9 +235,9 @@ Naming/UncommunicativeBlockParamName:
Exclude:
- 'lib/dor/services/public_xml_service.rb'

# Offense count: 15
# Offense count: 13
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at
# AllowedNames: io, id, to, by, on, in, at, ip, db
Naming/UncommunicativeMethodParamName:
Exclude:
- 'lib/dor/datastreams/content_metadata_ds.rb'
Expand All @@ -258,7 +248,6 @@ Naming/UncommunicativeMethodParamName:
- 'lib/dor/models/concerns/editable.rb'
- 'lib/dor/models/concerns/preservable.rb'
- 'lib/dor/models/concerns/rightsable.rb'
- 'lib/dor/workflow/graph.rb'

# Offense count: 19
# Configuration parameters: EnforcedStyle.
Expand Down Expand Up @@ -324,7 +313,7 @@ Style/Alias:
- 'lib/dor/models/workflow_object.rb'
- 'lib/dor/services/merge_service.rb'

# Offense count: 115
# Offense count: 106
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
Expand All @@ -334,25 +323,38 @@ Style/Alias:
Style/BlockDelimiters:
Enabled: false

# Offense count: 38
# Offense count: 34
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Enabled: false
Exclude:
- 'lib/dor/config.rb'
- 'lib/dor/datastreams/default_object_rights_ds.rb'
- 'lib/dor/models/concerns/editable.rb'
- 'lib/dor/models/concerns/publishable.rb'
- 'lib/dor/models/concerns/versionable.rb'
- 'lib/dor/services/registration_service.rb'
- 'lib/dor/services/search_service.rb'
- 'spec/datastreams/identity_metadata_spec.rb'
- 'spec/models/concerns/editable_spec.rb'
- 'spec/models/concerns/processable_spec.rb'
- 'spec/models/concerns/releaseable_spec.rb'
- 'spec/models/concerns/versionable_spec.rb'
- 'spec/models/workflow_document_spec.rb'
- 'spec/services/sdr_ingest_service_spec.rb'

# Offense count: 6
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/dor/datastreams/datastream_spec_solrizer.rb'
- 'lib/dor/models/agreement.rb'
- 'lib/dor/utils/ng_tidy.rb'
- 'spec/spec_helper.rb'

# Offense count: 11
# Offense count: 13
Style/ClassVars:
Exclude:
- 'lib/dor-services.rb'
Expand All @@ -371,23 +373,24 @@ Style/CommentedKeyword:
- 'lib/dor/services/reset_workspace_service.rb'
- 'spec/services/registration_service_spec.rb'

# Offense count: 4
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
# SupportedStyles: assign_to_condition, assign_inside_condition
Style/ConditionalAssignment:
Exclude:
- 'lib/dor/models/concerns/contentable.rb'
- 'lib/dor/models/concerns/publishable.rb'
- 'lib/dor/services/merge_service.rb'
- 'spec/support/foxml_helper.rb'

# Offense count: 1
# Offense count: 2
# Configuration parameters: AllowCoercion.
Style/DateTime:
Exclude:
- 'lib/dor/indexers/processable_indexer.rb'
- 'lib/dor/models/concerns/processable.rb'

# Offense count: 68
# Offense count: 73
Style/Documentation:
Enabled: false

Expand Down Expand Up @@ -436,7 +439,7 @@ Style/GuardClause:
- 'lib/dor/services/technical_metadata_service.rb'
- 'lib/dor/utils/predicate_patch.rb'

# Offense count: 661
# Offense count: 648
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
Expand All @@ -448,7 +451,7 @@ Style/IfInsideElse:
Exclude:
- 'lib/dor/models/concerns/identifiable.rb'

# Offense count: 28
# Offense count: 26
# Cop supports --auto-correct.
Style/IfUnlessModifier:
Enabled: false
Expand All @@ -461,11 +464,6 @@ Style/MethodDefParentheses:
Exclude:
- 'lib/dor/services/public_desc_metadata_service.rb'

# Offense count: 1
Style/MissingRespondToMissing:
Exclude:
- 'lib/dor/workflow/graph.rb'

# Offense count: 1
Style/MultilineBlockChain:
Exclude:
Expand All @@ -484,23 +482,15 @@ Style/NestedTernaryOperator:
Exclude:
- 'lib/dor/workflow/document.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinBodyLength.
# SupportedStyles: skip_modifier_ifs, always
Style/Next:
Exclude:
- 'lib/dor/models/concerns/publishable.rb'

# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: Strict.
Style/NumericLiterals:
MinDigits: 11

# Offense count: 20
# Offense count: 37
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Enabled: false
Expand All @@ -511,7 +501,7 @@ Style/OrAssignment:
Exclude:
- 'lib/dor/models/concerns/releaseable.rb'

# Offense count: 36
# Offense count: 34
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Expand Down Expand Up @@ -542,7 +532,7 @@ Style/RedundantReturn:
- 'lib/dor/datastreams/simple_dublin_core_ds.rb'
- 'lib/dor/utils/sdr_client.rb'

# Offense count: 27
# Offense count: 25
# Cop supports --auto-correct.
Style/RedundantSelf:
Exclude:
Expand All @@ -555,7 +545,7 @@ Style/RedundantSelf:
- 'lib/dor/services/metadata_service.rb'
- 'lib/dor/workflow/process.rb'

# Offense count: 12
# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Expand All @@ -566,7 +556,6 @@ Style/RegexpLiteral:
- 'lib/dor/services/registration_service.rb'
- 'lib/dor/services/search_service.rb'
- 'lib/dor/services/technical_metadata_service.rb'
- 'lib/dor/workflow/graph.rb'
- 'script/manual_integration.rb'
- 'spec/models/concerns/publishable_spec.rb'
- 'spec/services/digital_stacks_service_spec.rb'
Expand All @@ -578,7 +567,7 @@ Style/RescueModifier:
Exclude:
- 'lib/dor/services/indexing_service.rb'

# Offense count: 14
# Offense count: 13
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit
Expand Down Expand Up @@ -645,7 +634,7 @@ Style/StringLiterals:
Style/SymbolArray:
EnforcedStyle: brackets

# Offense count: 20
# Offense count: 19
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method
Expand All @@ -665,7 +654,6 @@ Style/SymbolProc:
- 'lib/dor/services/public_xml_service.rb'
- 'lib/dor/services/suri_service.rb'
- 'lib/dor/utils/ng_tidy.rb'
- 'spec/models/concerns/describable_spec.rb'

# Offense count: 7
# Cop supports --auto-correct.
Expand Down Expand Up @@ -698,15 +686,15 @@ Style/UnneededInterpolation:
- 'spec/services/cleanup_reset_service_spec.rb'
- 'spec/services/reset_workspace_service_spec.rb'

# Offense count: 6
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
EnforcedStyle: percent
MinSize: 4

# Offense count: 29
# Offense count: 27
# Cop supports --auto-correct.
Style/ZeroLengthPredicate:
Enabled: false
2 changes: 1 addition & 1 deletion dor-services.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rdoc'
s.add_development_dependency 'vcr'
s.add_development_dependency 'webmock'
s.add_development_dependency 'rubocop', '~> 0.56.0'
s.add_development_dependency 'rubocop', '~> 0.60.0'
s.add_development_dependency 'yard'

s.files = Dir.glob('lib/**/*') + Dir.glob('config/**/*') + Dir.glob('bin/*')
Expand Down
Loading

0 comments on commit b87d3f3

Please sign in to comment.