summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-03-02 12:47:55 +0000
committerBundlerbot <bot@bundler.io>2019-03-02 12:47:55 +0000
commiteeb5722f24e8868cbbf3687cc772254ac65d19df (patch)
tree0ded0674248747d5773b7924a954baaab4c5a23e
parent4820acf3dbea172c6ec4f165b875acbe85f095cd (diff)
parentbbb38af9407c4f932c31fbfaa10e00bee03bf10b (diff)
downloadbundler-eeb5722f24e8868cbbf3687cc772254ac65d19df.tar.gz
Merge #7004
7004: Bump rubocop to 0.65.0 r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that running rubocop (to fix style issues in other PRs) prints several warnings in the parser gem. ### What was your diagnosis of the problem? My diagnosis was that we should upgrade rubocop. ### What is your fix for the problem, implemented in this PR? My fix is to upgrade rubocop, fix the config to be compatible with the new version, and regenerate the TODO config. ### Why did you choose this fix out of the possible options? I chose this fix because it does the job. There's still some stuff I don't like about the current "rubocop maintainance" that I've proposed in #7003. But for the current situation I think this works. Closes #6608. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
-rw-r--r--.rubocop.yml15
-rw-r--r--.rubocop_todo.yml413
-rwxr-xr-xbin/rubocop2
-rw-r--r--bundler.gemspec2
4 files changed, 358 insertions, 74 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index a6412ecb13..7f8997dc1f 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -2,7 +2,7 @@ inherit_from:
- .rubocop_todo.yml
AllCops:
- TargetRubyVersion: 1.9
+ TargetRubyVersion: 2.3
Exclude:
- tmp/**/*
- lib/bundler/vendor/**/*
@@ -14,10 +14,6 @@ AllCops:
Lint/AssignmentInCondition:
Enabled: false
-Lint/EndAlignment:
- EnforcedStyleAlignWith: variable
- AutoCorrect: true
-
Lint/UnusedMethodArgument:
Enabled: false
@@ -33,6 +29,10 @@ Layout/AccessModifierIndentation:
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
+Layout/EndAlignment:
+ EnforcedStyleAlignWith: variable
+ AutoCorrect: true
+
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
@@ -74,7 +74,10 @@ Style/StringLiteralsInInterpolation:
# Having these make it easier to *not* forget to add one when adding a new
# value and you can simply copy the previous line.
-Style/TrailingCommaInLiteral:
+Style/TrailingCommaInArrayLiteral:
+ EnforcedStyleForMultiline: comma
+
+Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingUnderscoreVariable:
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index e8c49c05c4..80d5f9b4cc 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,35 +1,144 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2017-09-17 16:46:43 +0900 using RuboCop version 0.50.0.
+# on 2019-03-01 19:11:10 +0100 using RuboCop version 0.65.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: 2
+# Configuration parameters: Include.
+# Include: **/*.gemspec
+Gemspec/DuplicatedAssignment:
+ Exclude:
+ - 'bundler.gemspec'
+
+# Offense count: 13
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: outdent, indent
+Layout/AccessModifierIndentation:
+ Exclude:
+ - 'lib/bundler/cli.rb'
+ - 'lib/bundler/definition.rb'
+ - 'lib/bundler/feature_flag.rb'
+ - 'lib/bundler/gem_helpers.rb'
+ - 'lib/bundler/index.rb'
+ - 'lib/bundler/remote_specification.rb'
+ - 'lib/bundler/shared_helpers.rb'
+ - 'lib/bundler/source/path.rb'
+ - 'spec/realworld/gemfile_source_header_spec.rb'
+
+# Offense count: 71
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
+# SupportedHashRocketStyles: key, separator, table
+# SupportedColonStyles: key, separator, table
+# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
+Layout/AlignHash:
+ Exclude:
+ - 'lib/bundler/cli/console.rb'
+ - 'lib/bundler/cli/gem.rb'
+ - 'lib/bundler/dependency.rb'
+ - 'lib/bundler/graph.rb'
+ - 'lib/bundler/lockfile_parser.rb'
+ - 'lib/bundler/plugin/index.rb'
+ - 'lib/bundler/source/rubygems.rb'
+ - 'spec/realworld/dependency_api_spec.rb'
+ - 'spec/realworld/gemfile_source_header_spec.rb'
+ - 'spec/realworld/mirror_probe_spec.rb'
+ - 'spec/support/artifice/endpoint.rb'
+
+# Offense count: 7
+# Cop supports --auto-correct.
+Layout/BlockEndNewline:
+ Exclude:
+ - 'lib/bundler/settings.rb'
+ - 'spec/bundler/shared_helpers_spec.rb'
+
+# Offense count: 17
+# Cop supports --auto-correct.
+Layout/ClosingHeredocIndentation:
+ Exclude:
+ - 'lib/bundler/cli/plugin.rb'
+ - 'lib/bundler/rubygems_gem_installer.rb'
+ - 'spec/bundler/bundler_spec.rb'
+ - 'spec/commands/config_spec.rb'
+ - 'spec/install/bundler_spec.rb'
+ - 'spec/install/failure_spec.rb'
+ - 'spec/lock/lockfile_bundler_1_spec.rb'
+ - 'spec/lock/lockfile_spec.rb'
+ - 'spec/other/platform_spec.rb'
+
+# Offense count: 5
+# Cop supports --auto-correct.
+Layout/ElseAlignment:
+ Exclude:
+ - 'lib/bundler/dsl.rb'
+ - 'lib/bundler/resolver.rb'
+ - 'lib/bundler/source/path.rb'
+
+# Offense count: 290
+# Cop supports --auto-correct.
+Layout/EmptyLineAfterGuardClause:
+ Enabled: false
+
+# Offense count: 4
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
+# SupportedStylesAlignWith: keyword, variable, start_of_line
+Layout/EndAlignment:
+ Exclude:
+ - 'lib/bundler/dsl.rb'
+ - 'lib/bundler/resolver.rb'
+ - 'lib/bundler/source/path.rb'
+
# Offense count: 10
# Cop supports --auto-correct.
-# Configuration parameters: SupportedStyles, IndentationWidth.
+# Configuration parameters: IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Layout/IndentArray:
EnforcedStyle: consistent
-# Offense count: 40
+# Offense count: 46
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
+# Configuration parameters: EnforcedStyle.
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
Layout/IndentHeredoc:
Enabled: false
+# Offense count: 4
+# Cop supports --auto-correct.
+# Configuration parameters: Width, IgnoredPatterns.
+Layout/IndentationWidth:
+ Exclude:
+ - 'lib/bundler/dsl.rb'
+ - 'lib/bundler/resolver.rb'
+ - 'lib/bundler/source/path.rb'
+
# Offense count: 3
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
+# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver
Layout/MultilineMethodCallIndentation:
Exclude:
- 'lib/bundler/cli/common.rb'
- 'spec/bundler/plugin/source_list_spec.rb'
-# Offense count: 31
+# Offense count: 9
+# Cop supports --auto-correct.
+Layout/RescueEnsureAlignment:
+ Exclude:
+ - 'lib/bundler/cli.rb'
+ - 'lib/bundler/cli/gem.rb'
+ - 'lib/bundler/definition.rb'
+ - 'lib/bundler/installer/parallel_installer.rb'
+ - 'lib/bundler/resolver.rb'
+ - 'lib/bundler/ruby_version.rb'
+ - 'lib/bundler/rubygems_integration.rb'
+ - 'lib/bundler/shared_helpers.rb'
+
+# Offense count: 27
Lint/AmbiguousBlockAssociation:
Exclude:
- 'lib/bundler/definition.rb'
@@ -40,7 +149,6 @@ Lint/AmbiguousBlockAssociation:
- 'spec/install/gems/flex_spec.rb'
- 'spec/lock/lockfile_bundler_1_spec.rb'
- 'spec/lock/lockfile_spec.rb'
- - 'spec/other/major_deprecation_spec.rb'
- 'spec/runtime/setup_spec.rb'
- 'spec/support/helpers.rb'
- 'spec/support/indexes.rb'
@@ -51,7 +159,7 @@ Lint/EmptyWhen:
- 'lib/bundler/friendly_errors.rb'
- 'spec/support/builders.rb'
-# Offense count: 3
+# Offense count: 4
Lint/HandleExceptions:
Exclude:
- 'lib/bundler/psyched_yaml.rb'
@@ -62,14 +170,18 @@ Lint/IneffectiveAccessModifier:
Exclude:
- 'lib/bundler/settings.rb'
-# Offense count: 6
+# Offense count: 3
Lint/InterpolationCheck:
Exclude:
- 'lib/bundler/dsl.rb'
- 'lib/bundler/installer/standalone.rb'
- - 'spec/commands/binstubs_spec.rb'
- 'spec/install/gems/standalone_spec.rb'
- - 'spec/other/major_deprecation_spec.rb'
+
+# Offense count: 1
+# Configuration parameters: MaximumRangeSize.
+Lint/MissingCopEnableDirective:
+ Exclude:
+ - 'lib/bundler/version.rb'
# Offense count: 3
Lint/NestedMethodDefinition:
@@ -86,50 +198,61 @@ Lint/RescueException:
- 'lib/bundler/rubygems_integration.rb'
- 'lib/bundler/worker.rb'
-# Offense count: 29
-Lint/RescueWithoutErrorClass:
- Enabled: false
-
# Offense count: 2
Lint/ShadowedException:
Exclude:
- 'lib/bundler.rb'
- 'lib/bundler/rubygems_integration.rb'
+# Offense count: 5
+# Cop supports --auto-correct.
+Lint/UnneededRequireStatement:
+ Exclude:
+ - 'lib/bundler.rb'
+ - 'lib/bundler/worker.rb'
+ - 'spec/realworld/dependency_api_spec.rb'
+ - 'spec/realworld/gemfile_source_header_spec.rb'
+ - 'spec/realworld/mirror_probe_spec.rb'
+
# Offense count: 1
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
Lint/UselessAccessModifier:
Exclude:
- 'lib/bundler/fetcher.rb'
-# Offense count: 6
+# Offense count: 1
Lint/UselessAssignment:
Exclude:
- 'lib/bundler/index.rb'
- - 'lib/bundler/installer.rb'
-
-# Offense count: 2564
-# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
-# URISchemes: http, https
-Metrics/LineLength:
- Max: 207
# Offense count: 1
Naming/AccessorMethodName:
Exclude:
- 'lib/bundler/source/git.rb'
-# Offense count: 31
+# Offense count: 33
# Configuration parameters: Blacklist.
-# Blacklist: END, (?-mix:EO[A-Z]{1})
+# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
Enabled: false
+# Offense count: 7
+# Configuration parameters: EnforcedStyleForLeadingUnderscores.
+# SupportedStylesForLeadingUnderscores: disallowed, required, optional
+Naming/MemoizedInstanceVariableName:
+ Exclude:
+ - 'lib/bundler.rb'
+ - 'lib/bundler/lazy_specification.rb'
+ - 'lib/bundler/ruby_version.rb'
+ - 'lib/bundler/rubygems_ext.rb'
+ - 'spec/support/sudo.rb'
+
# Offense count: 9
-# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
+# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
# NameWhitelist: is_a?
+# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Exclude:
- 'spec/**/*'
@@ -140,25 +263,25 @@ Naming/PredicateName:
- 'lib/bundler/source/git/git_proxy.rb'
- 'lib/bundler/source/path.rb'
+# Offense count: 19
+# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
+# AllowedNames: io, id, to, by, on, in, at, ip, db
+Naming/UncommunicativeMethodParamName:
+ Enabled: false
+
# Offense count: 2
Performance/Caller:
Exclude:
- 'lib/bundler/rubygems_integration.rb'
- 'spec/support/builders.rb'
-# Offense count: 9
+# Offense count: 3
# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect.
-Performance/HashEachMethods:
+Performance/InefficientHashSearch:
Exclude:
- - 'lib/bundler/definition.rb'
- - 'lib/bundler/dependency.rb'
- - 'lib/bundler/dsl.rb'
- - 'lib/bundler/index.rb'
+ - 'lib/bundler/cli/common.rb'
+ - 'lib/bundler/cli/outdated.rb'
- 'lib/bundler/plugin.rb'
- - 'spec/install/gems/standalone_spec.rb'
- - 'spec/support/builders.rb'
- - 'spec/support/helpers.rb'
# Offense count: 7
# Cop supports --auto-correct.
@@ -183,6 +306,16 @@ Performance/RedundantMerge:
Exclude:
- 'lib/bundler/cli/gem.rb'
+# Offense count: 34
+Performance/UnfreezeString:
+ Enabled: false
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Performance/UnneededSort:
+ Exclude:
+ - 'lib/bundler/gem_helper.rb'
+
# Offense count: 4
Security/Eval:
Exclude:
@@ -198,21 +331,43 @@ Security/MarshalLoad:
- 'spec/support/artifice/compact_index.rb'
- 'spec/support/artifice/endpoint.rb'
+# Offense count: 12
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: inline, group
+Style/AccessModifierDeclarations:
+ Exclude:
+ - 'lib/bundler/cli.rb'
+ - 'lib/bundler/definition.rb'
+ - 'lib/bundler/feature_flag.rb'
+ - 'lib/bundler/gem_helpers.rb'
+ - 'lib/bundler/index.rb'
+ - 'lib/bundler/remote_specification.rb'
+ - 'lib/bundler/shared_helpers.rb'
+ - 'lib/bundler/source/path.rb'
+
# Offense count: 3
Style/CaseEquality:
Exclude:
- 'lib/bundler/match_platform.rb'
- 'lib/bundler/rubygems_ext.rb'
-# Offense count: 27
-# Configuration parameters: EnforcedStyle, SupportedStyles.
+# Offense count: 28
+# Cop supports --auto-correct.
+# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Enabled: false
+# Offense count: 3
+Style/CommentedKeyword:
+ Exclude:
+ - 'spec/plugins/source/example_spec.rb'
+ - 'spec/support/artifice/fail.rb'
+ - 'spec/support/artifice/vcr.rb'
+
# Offense count: 9
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions.
+# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
# SupportedStyles: assign_to_condition, assign_inside_condition
Style/ConditionalAssignment:
Exclude:
@@ -226,27 +381,24 @@ Style/ConditionalAssignment:
- 'lib/bundler/source/git.rb'
- 'lib/bundler/source/rubygems.rb'
-# Offense count: 167
+# Offense count: 168
Style/Documentation:
Enabled: false
-# Offense count: 17
+# Offense count: 14
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
+# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, expanded
Style/EmptyMethod:
Exclude:
- - 'exe/bundle_ruby'
- 'lib/bundler/cli.rb'
- 'lib/bundler/plugin/api/source.rb'
- 'lib/bundler/rubygems_integration.rb'
- 'lib/bundler/ui/silent.rb'
- 'spec/support/artifice/fail.rb'
-# Offense count: 5
+# Offense count: 7
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
-# SupportedStyles: when_needed, always, never
Style/Encoding:
Exclude:
- 'Rakefile'
@@ -257,11 +409,23 @@ Style/Encoding:
- 'spec/install/gemspecs_spec.rb'
- 'spec/quality_es_spec.rb'
-# Offense count: 1
-# Configuration parameters: SupportedStyles.
-# SupportedStyles: annotated, template
+# Offense count: 2
+Style/EvalWithLocation:
+ Exclude:
+ - 'spec/support/streams.rb'
+
+# Offense count: 86
+# Cop supports --auto-correct.
+Style/ExpandPathArguments:
+ Enabled: false
+
+# Offense count: 2
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
- EnforcedStyle: template
+ Exclude:
+ - 'lib/bundler/settings.rb'
+ - 'spec/commands/exec_spec.rb'
# Offense count: 2
# Configuration parameters: AllowedVariables.
@@ -270,7 +434,7 @@ Style/GlobalVars:
- 'lib/bundler/cli.rb'
- 'spec/spec_helper.rb'
-# Offense count: 12
+# Offense count: 11
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
@@ -283,9 +447,13 @@ Style/GuardClause:
- 'lib/bundler/runtime.rb'
- 'lib/bundler/source/path/installer.rb'
- 'lib/bundler/source_list.rb'
- - 'spec/commands/newgem_spec.rb'
- 'spec/support/sometimes.rb'
+# Offense count: 108
+# Cop supports --auto-correct.
+Style/IfUnlessModifier:
+ Enabled: false
+
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: InverseMethods, InverseBlocks.
@@ -298,8 +466,17 @@ Style/InverseMethods:
- 'lib/bundler/resolver.rb'
- 'lib/bundler/resolver/spec_group.rb'
+# Offense count: 5
+Style/MethodMissingSuper:
+ Exclude:
+ - 'lib/bundler/dep_proxy.rb'
+ - 'lib/bundler/dsl.rb'
+ - 'lib/bundler/plugin/dsl.rb'
+ - 'lib/bundler/remote_specification.rb'
+ - 'spec/support/builders.rb'
+
# Offense count: 6
-Style/MethodMissing:
+Style/MissingRespondToMissing:
Exclude:
- 'lib/bundler/dep_proxy.rb'
- 'lib/bundler/dsl.rb'
@@ -308,12 +485,20 @@ Style/MethodMissing:
- 'lib/bundler/remote_specification.rb'
- 'spec/support/builders.rb'
-# Offense count: 2
-# Configuration parameters: EnforcedStyle, SupportedStyles.
+# Offense count: 4
+Style/MixinUsage:
+ Exclude:
+ - 'lib/bundler/vlad.rb'
+ - 'spec/support/artifice/endpoint.rb'
+ - 'spec/support/artifice/endpoint_500.rb'
+ - 'spec/support/artifice/windows.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, Autocorrect.
# SupportedStyles: module_function, extend_self
Style/ModuleFunction:
Exclude:
- - 'lib/bundler/shared_helpers.rb'
- 'spec/support/path.rb'
# Offense count: 10
@@ -327,20 +512,33 @@ Style/MultilineIfModifier:
- 'lib/bundler/runtime.rb'
- 'lib/bundler/source/rubygems.rb'
-# Offense count: 5
+# Offense count: 10
# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: literals, strict
+Style/MutableConstant:
+ Exclude:
+ - 'lib/bundler/cli/doctor.rb'
+ - 'lib/bundler/lockfile_parser.rb'
+ - 'lib/bundler/ruby_version.rb'
+ - 'lib/bundler/settings.rb'
+ - 'lib/bundler/yaml_serializer.rb'
+ - 'spec/support/matchers.rb'
+
+# Offense count: 3
+# Cop supports --auto-correct.
+# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- - 'lib/bundler/gem_helper.rb'
+ - 'lib/bundler/cli/common.rb'
- 'lib/bundler/mirror.rb'
- 'lib/bundler/source/path.rb'
# Offense count: 24
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
+# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
Exclude:
@@ -360,20 +558,97 @@ Style/RaiseArgs:
- 'spec/bundler/rubygems_integration_spec.rb'
- 'spec/bundler/shared_helpers_spec.rb'
-# Offense count: 9
+# Offense count: 24
+# Cop supports --auto-correct.
+Style/RedundantFreeze:
+ Exclude:
+ - 'bin/bundle1'
+ - 'bin/bundle2'
+ - 'lib/bundler.rb'
+ - 'lib/bundler/endpoint_specification.rb'
+ - 'lib/bundler/environment_preserver.rb'
+ - 'lib/bundler/index.rb'
+ - 'lib/bundler/injector.rb'
+ - 'lib/bundler/installer.rb'
+ - 'lib/bundler/lockfile_generator.rb'
+ - 'lib/bundler/lockfile_parser.rb'
+ - 'lib/bundler/plugin.rb'
+ - 'lib/bundler/resolver/spec_group.rb'
+ - 'lib/bundler/source/path.rb'
+ - 'spec/bundler/shared_helpers_spec.rb'
+
+# Offense count: 3
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
+# Configuration parameters: AllowMultipleReturnValues.
+Style/RedundantReturn:
+ Exclude:
+ - 'lib/bundler/installer/gem_installer.rb'
+
+# Offense count: 13
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: implicit, explicit
+Style/RescueStandardError:
+ Exclude:
+ - 'Rakefile'
+ - 'lib/bundler/friendly_errors.rb'
+ - 'lib/bundler/resolver.rb'
+ - 'lib/bundler/retry.rb'
+ - 'lib/bundler/source/rubygems.rb'
+ - 'spec/support/artifice/compact_index.rb'
+ - 'spec/support/helpers.rb'
+ - 'spec/support/matchers.rb'
+
+# Offense count: 35
+# Cop supports --auto-correct.
+# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
+# Whitelist: present?, blank?, presence, try, try!
+Style/SafeNavigation:
+ Enabled: false
+
+# Offense count: 4
+# Cop supports --auto-correct.
+Style/StderrPuts:
+ Exclude:
+ - 'bin/rake'
+ - 'lib/bundler/graph.rb'
+ - 'spec/support/artifice/compact_index_api_missing.rb'
+ - 'spec/support/artifice/endpoint_api_missing.rb'
+
+# Offense count: 57
+# Cop supports --auto-correct.
+# Configuration parameters: MinSize.
+# SupportedStyles: percent, brackets
+Style/SymbolArray:
+ EnforcedStyle: brackets
+
+# Offense count: 3
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
-Style/TrailingCommaInLiteral:
+Style/TrailingCommaInArrayLiteral:
Exclude:
- - 'lib/bundler/cli/gem.rb'
- - 'lib/bundler/fetcher.rb'
- 'lib/bundler/gem_helpers.rb'
- - 'lib/bundler/graph.rb'
- 'lib/bundler/ruby_version.rb'
- 'lib/bundler/similarity_detector.rb'
+
+# Offense count: 6
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyleForMultiline.
+# SupportedStylesForMultiline: comma, consistent_comma, no_comma
+Style/TrailingCommaInHashLiteral:
+ Exclude:
+ - 'lib/bundler/cli/gem.rb'
+ - 'lib/bundler/fetcher.rb'
+ - 'lib/bundler/graph.rb'
- 'spec/support/artifice/endpoint.rb'
+# Offense count: 2
+# Cop supports --auto-correct.
+Style/UnneededCondition:
+ Exclude:
+ - 'lib/bundler/gem_helper.rb'
+
# Offense count: 14
# Cop supports --auto-correct.
Style/UnneededInterpolation:
@@ -383,3 +658,9 @@ Style/UnneededInterpolation:
- 'spec/bundler/shared_helpers_spec.rb'
- 'spec/cache/git_spec.rb'
- 'spec/commands/exec_spec.rb'
+
+# Offense count: 2826
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
+# URISchemes: http, https
+Metrics/LineLength:
+ Max: 207
diff --git a/bin/rubocop b/bin/rubocop
index 81f4679fb8..8014aff639 100755
--- a/bin/rubocop
+++ b/bin/rubocop
@@ -10,7 +10,7 @@ bundler_spec.dependencies.each do |dep|
gem dep.name, dep.requirement
end
-gem "rubocop", "= 0.50.0"
+gem "rubocop", "= 0.65.0"
Gem.finish_resolve if Gem.respond_to?(:finish_resolve)
diff --git a/bundler.gemspec b/bundler.gemspec
index 56cb8e3ae1..aa27619200 100644
--- a/bundler.gemspec
+++ b/bundler.gemspec
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rake", "~> 12.0"
s.add_development_dependency "ronn", "~> 0.7.3"
s.add_development_dependency "rspec", "~> 3.6"
- s.add_development_dependency "rubocop", "= 0.50.0"
+ s.add_development_dependency "rubocop", "= 0.65.0"
base_dir = File.dirname(__FILE__).gsub(%r{([^A-Za-z0-9_\-.,:\/@\n])}, "\\\\\\1")
s.files = IO.popen("git -C #{base_dir} ls-files -z", &:read).split("\x0").select {|f| f.match(%r{^(lib|exe)/}) }