summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-03 14:23:52 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-05 09:47:25 +0100
commit210f129b6e22b87a0226975144a91cd73ced593d (patch)
treeff29a96bca171f56b0a77c08c9343d22033336c8
parent4c817e5632e596c6c811ed31bb26af64c1f0195e (diff)
downloadbundler-rubocop_disabled_by_default.tar.gz
Switch to a DisabledByDefault rubocop approachrubocop_disabled_by_default
We keep the same set of rules that were previously enabled, but make sure that we don't need to maintain a TODO file with exceptions, and that upgrading rubocop doesn't silently include new rules without us explicitly opting in.
-rw-r--r--.rubocop.yml813
-rw-r--r--.rubocop_todo.yml545
2 files changed, 739 insertions, 619 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 4226671d3a..8fd8c2c588 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,146 +1,811 @@
-inherit_from:
- - .rubocop_todo.yml
-
AllCops:
+ DisabledByDefault: true
TargetRubyVersion: 2.3
Exclude:
- tmp/**/*
- lib/bundler/vendor/**/*
DisplayCopNames: true
+# Bundler
+
+Bundler/DuplicatedGem:
+ Enabled: true
+
+Bundler/InsecureProtocolSource:
+ Enabled: true
+
+Bundler/OrderedGems:
+ Enabled: true
+
+# Gemspec
+
+Gemspec/OrderedDependencies:
+ Enabled: true
+
+Gemspec/RequiredRubyVersion:
+ Enabled: true
+
# Lint
-# They are idiomatic
-Lint/AssignmentInCondition:
- Enabled: false
+Lint/AmbiguousOperator:
+ Enabled: true
+
+Lint/AmbiguousRegexpLiteral:
+ Enabled: true
+
+Lint/BigDecimalNew:
+ Enabled: true
+
+Lint/BooleanSymbol:
+ Enabled: true
+
+Lint/Debugger:
+ Enabled: true
+
+Lint/DeprecatedClassMethods:
+ Enabled: true
+
+Lint/DuplicateCaseCondition:
+ Enabled: true
+
+Lint/DuplicateMethods:
+ Enabled: true
+
+Lint/DuplicatedKey:
+ Enabled: true
+
+Lint/EachWithObjectArgument:
+ Enabled: true
+
+Lint/ElseLayout:
+ Enabled: true
+
+Lint/EmptyEnsure:
+ Enabled: true
+
+Lint/EmptyExpression:
+ Enabled: true
+
+Lint/EmptyInterpolation:
+ Enabled: true
+
+Lint/EndInMethod:
+ Enabled: true
+
+Lint/EnsureReturn:
+ Enabled: true
+
+Lint/ErbNewArguments:
+ Enabled: true
+
+Lint/FlipFlop:
+ Enabled: true
+
+Lint/FloatOutOfRange:
+ Enabled: true
+
+Lint/FormatParameterMismatch:
+ Enabled: true
+
+Lint/ImplicitStringConcatenation:
+ Enabled: true
+
+Lint/InheritException:
+ Enabled: true
+
+Lint/LiteralAsCondition:
+ Enabled: true
+
+Lint/LiteralInInterpolation:
+ Enabled: true
+
+Lint/Loop:
+ Enabled: true
-Lint/UnusedMethodArgument:
- Enabled: false
+Lint/MultipleCompare:
+ Enabled: true
+
+Lint/NestedPercentLiteral:
+ Enabled: true
+
+Lint/NextWithoutAccumulator:
+ Enabled: true
+
+Lint/NonLocalExitFromIterator:
+ Enabled: true
+
+Lint/OrderedMagicComments:
+ Enabled: true
+
+Lint/ParenthesesAsGroupedExpression:
+ Enabled: true
+
+Lint/PercentStringArray:
+ Enabled: true
+
+Lint/PercentSymbolArray:
+ Enabled: true
+
+Lint/RandOne:
+ Enabled: true
+
+Lint/RedundantWithIndex:
+ Enabled: true
+
+Lint/RedundantWithObject:
+ Enabled: true
+
+Lint/RegexpAsCondition:
+ Enabled: true
+
+Lint/RequireParentheses:
+ Enabled: true
+
+Lint/RescueException:
+ Enabled: true
+
+Lint/RescueType:
+ Enabled: true
+
+Lint/ReturnInVoidContext:
+ Enabled: true
+
+Lint/SafeNavigationChain:
+ Enabled: true
+
+Lint/SafeNavigationConsistency:
+ Enabled: true
Lint/ScriptPermission:
+ Enabled: true
Exclude:
- 'lib/bundler/templates/Executable'
+Lint/ShadowedArgument:
+ Enabled: true
+
+Lint/ShadowingOuterLocalVariable:
+ Enabled: true
+
+Lint/StringConversionInInterpolation:
+ Enabled: true
+
+Lint/Syntax:
+ Enabled: true
+
+Lint/UnderscorePrefixedVariableName:
+ Enabled: true
+
+Lint/UnifiedInteger:
+ Enabled: true
+
+Lint/UnneededCopDisableDirective:
+ Enabled: true
+
+Lint/UnneededCopEnableDirective:
+ Enabled: true
+
+Lint/UnneededSplatExpansion:
+ Enabled: true
+
+Lint/UnreachableCode:
+ Enabled: true
+
+Lint/UnusedBlockArgument:
+ Enabled: true
+
+Lint/UriEscapeUnescape:
+ Enabled: true
+
+Lint/UriRegexp:
+ Enabled: true
+
+Lint/UselessComparison:
+ Enabled: true
+
+Lint/UselessElseWithoutRescue:
+ Enabled: true
+
+Lint/UselessSetterCall:
+ Enabled: true
+
+Lint/Void:
+ Enabled: true
+
# Layout
Layout/AccessModifierIndentation:
+ Enabled: true
EnforcedStyle: outdent
+ 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'
+
+Layout/AlignArray:
+ Enabled: true
Layout/AlignParameters:
+ Enabled: true
EnforcedStyle: with_fixed_indentation
+Layout/BlockAlignment:
+ Enabled: true
+
+Layout/CaseIndentation:
+ Enabled: true
+
+Layout/ClosingParenthesisIndentation:
+ Enabled: true
+
+Layout/CommentIndentation:
+ Enabled: true
+
+Layout/ConditionPosition:
+ Enabled: true
+
+Layout/DefEndAlignment:
+ Enabled: true
+
+Layout/DotPosition:
+ Enabled: true
+ EnforcedStyle: trailing
+
+Layout/ElseAlignment:
+ Enabled: true
+
+Layout/EmptyComment:
+ Enabled: true
+
+Layout/EmptyLineAfterMagicComment:
+ Enabled: true
+
+Layout/EmptyLineBetweenDefs:
+ Enabled: true
+
+Layout/EmptyLines:
+ Enabled: true
+
+Layout/EmptyLinesAroundAccessModifier:
+ Enabled: true
+
+Layout/EmptyLinesAroundArguments:
+ Enabled: true
+
+Layout/EmptyLinesAroundBeginBody:
+ Enabled: true
+
+Layout/EmptyLinesAroundBlockBody:
+ Enabled: true
+
+Layout/EmptyLinesAroundClassBody:
+ Enabled: true
+
+Layout/EmptyLinesAroundExceptionHandlingKeywords:
+ Enabled: true
+
+Layout/EmptyLinesAroundMethodBody:
+ Enabled: true
+
+Layout/EmptyLinesAroundModuleBody:
+ Enabled: true
+
Layout/EndAlignment:
+ Enabled: true
EnforcedStyleAlignWith: variable
AutoCorrect: true
+Layout/EndOfLine:
+ Enabled: true
+
+Layout/ExtraSpacing:
+ Enabled: true
+
+Layout/FirstParameterIndentation:
+ Enabled: true
+
+Layout/IndentArray:
+ Enabled: true
+ EnforcedStyle: consistent
+
+Layout/IndentAssignment:
+ Enabled: true
+
+Layout/IndentHash:
+ Enabled: true
+ EnforcedStyle: special_inside_parentheses
+
+Layout/IndentationConsistency:
+ Enabled: true
+
+Layout/IndentationWidth:
+ Enabled: true
+
+Layout/InitialIndentation:
+ Enabled: true
+
+Layout/LeadingBlankLines:
+ Enabled: true
+
+Layout/LeadingCommentSpace:
+ Enabled: true
+
+Layout/MultilineArrayBraceLayout:
+ Enabled: true
+
+Layout/MultilineBlockLayout:
+ Enabled: true
+
+Layout/MultilineHashBraceLayout:
+ Enabled: true
+
+Layout/MultilineMethodCallBraceLayout:
+ Enabled: true
+
+Layout/MultilineMethodDefinitionBraceLayout:
+ Enabled: true
+
Layout/MultilineOperationIndentation:
+ Enabled: true
EnforcedStyle: indented
+Layout/SpaceBeforeComma:
+ Enabled: true
+
+Layout/SpaceBeforeComment:
+ Enabled: true
+
+Layout/SpaceBeforeFirstArg:
+ Enabled: true
+
+Layout/SpaceBeforeSemicolon:
+ Enabled: true
+
+Layout/SpaceInLambdaLiteral:
+ Enabled: true
+
+Layout/SpaceInsideArrayLiteralBrackets:
+ Enabled: true
+
+Layout/SpaceInsideArrayPercentLiteral:
+ Enabled: true
+
Layout/SpaceInsideBlockBraces:
+ Enabled: true
SpaceBeforeBlockParameters: false
-Layout/DotPosition:
- EnforcedStyle: trailing
+Layout/SpaceInsideHashLiteralBraces:
+ Enabled: true
+
+Layout/SpaceInsideParens:
+ Enabled: true
+
+Layout/SpaceInsidePercentLiteralDelimiters:
+ Enabled: true
+
+Layout/SpaceInsideRangeLiteral:
+ Enabled: true
+
+Layout/SpaceInsideReferenceBrackets:
+ Enabled: true
+
+Layout/SpaceInsideStringInterpolation:
+ Enabled: true
+
+Layout/Tab:
+ Enabled: true
+
+Layout/TrailingBlankLines:
+ Enabled: true
+
+Layout/TrailingWhitespace:
+ Enabled: true
+
+# Naming
+
+Naming/AsciiIdentifiers:
+ Enabled: true
+
+Naming/BinaryOperatorParameterName:
+ Enabled: true
+
+Naming/ClassAndModuleCamelCase:
+ Enabled: true
+
+Naming/ConstantName:
+ Enabled: true
+
+Naming/FileName:
+ Enabled: true
+
+Naming/HeredocDelimiterCase:
+ Enabled: true
+
+Naming/MethodName:
+ Enabled: true
+
+Naming/UncommunicativeBlockParamName:
+ Enabled: true
+
+Naming/VariableName:
+ Enabled: true
+
+Naming/VariableNumber:
+ Enabled: true
+
+# Performance
+
+Performance/Casecmp:
+ Enabled: true
+
+Performance/CompareWithBlock:
+ Enabled: true
+
+Performance/Count:
+ Enabled: true
+
+Performance/Detect:
+ Enabled: true
+
+Performance/DoubleStartEndWith:
+ Enabled: true
+
+Performance/EndWith:
+ Enabled: true
+
+Performance/FixedSize:
+ Enabled: true
+
+Performance/LstripRstrip:
+ Enabled: true
+
+Performance/RedundantSortBy:
+ Enabled: true
+
+Performance/RegexpMatch:
+ Enabled: true
+
+Performance/ReverseEach:
+ Enabled: true
+
+Performance/Sample:
+ Enabled: true
+
+Performance/Size:
+ Enabled: true
+
+Performance/StartWith:
+ Enabled: true
+
+Performance/StringReplacement:
+ Enabled: true
+
+Performance/TimesMap:
+ Enabled: true
+
+Performance/UriDefaultParser:
+ Enabled: true
+
+# Security
+
+Security/JSONLoad:
+ Enabled: true
# Style
Style/Alias:
+ Enabled: true
EnforcedStyle: prefer_alias_method
-Style/FrozenStringLiteralComment:
+Style/AndOr:
+ Enabled: true
EnforcedStyle: always
-Style/GuardClause:
- Enabled: false
+Style/ArrayJoin:
+ Enabled: true
-Style/MultilineBlockChain:
- Enabled: false
+Style/AsciiComments:
+ Enabled: true
-Style/PerlBackrefs:
- Enabled: false
+Style/Attr:
+ Enabled: true
-Style/SingleLineBlockParams:
- Enabled: false
+Style/BarePercentLiterals:
+ Enabled: true
-Style/TrivialAccessors:
- Enabled: false
+Style/BeginBlock:
+ Enabled: true
-# We adopted raise instead of fail.
-Style/SignalException:
- EnforcedStyle: only_raise
+Style/BlockComments:
+ Enabled: true
-Style/StringLiterals:
- EnforcedStyle: double_quotes
+Style/BlockDelimiters:
+ Enabled: true
-Style/StringLiteralsInInterpolation:
- EnforcedStyle: double_quotes
+Style/BracesAroundHashParameters:
+ Enabled: true
-# 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/TrailingCommaInArrayLiteral:
- EnforcedStyleForMultiline: comma
+Style/CharacterLiteral:
+ Enabled: true
-Style/TrailingCommaInHashLiteral:
- EnforcedStyleForMultiline: comma
+Style/ClassCheck:
+ Enabled: true
-Style/TrailingUnderscoreVariable:
- Enabled: false
+Style/ClassMethods:
+ Enabled: true
-# `String.new` is preferred style with enabled frozen string literal
-Style/EmptyLiteral:
- Enabled: false
+Style/ClassVars:
+ Enabled: true
-# 1.8.7 support
+Style/ColonMethodCall:
+ Enabled: true
+
+Style/ColonMethodDefinition:
+ Enabled: true
+
+Style/CommandLiteral:
+ Enabled: true
+
+Style/CommentAnnotation:
+ Enabled: true
+
+Style/DefWithParentheses:
+ Enabled: true
+
+Style/Dir:
+ Enabled: true
+
+Style/DoubleNegation:
+ Enabled: true
+Style/EachForSimpleLoop:
+ Enabled: true
+
+Style/EmptyBlockParameter:
+ Enabled: true
+
+Style/EmptyCaseCondition:
+ Enabled: true
+
+Style/EmptyElse:
+ Enabled: true
+
+Style/EmptyLambdaParameter:
+ Enabled: true
+
+Style/Encoding:
+ Enabled: true
+
+Style/EndBlock:
+ Enabled: true
+
+Style/EvenOdd:
+ Enabled: true
+
+Style/For:
+ Enabled: true
+
+Style/FormatString:
+ Enabled: true
+
+Style/FrozenStringLiteralComment:
+ Enabled: true
+ EnforcedStyle: always
+
+# 1.8.7 support
Style/HashSyntax:
+ Enabled: true
EnforcedStyle: hash_rockets
-Style/Lambda:
- Enabled: false
+Style/IdenticalConditionalBranches:
+ Enabled: true
+
+Style/IfInsideElse:
+ Enabled: true
-Style/EachWithObject:
- Enabled: false
+Style/IfUnlessModifierOfIfUnless:
+ Enabled: true
-Style/SpecialGlobalVars:
- Enabled: false
+Style/IfWithSemicolon:
+ Enabled: true
-Style/TrailingCommaInArguments:
- Enabled: false
+Style/InfiniteLoop:
+ Enabled: true
-Performance/FlatMap:
- Enabled: false
+Style/LambdaCall:
+ Enabled: true
-Security/YAMLLoad:
- Enabled: false
+Style/LineEndConcatenation:
+ Enabled: true
-# Metrics
+Style/MethodCallWithoutArgsParentheses:
+ Enabled: true
-# We've chosen to use Rubocop only for style, and not for complexity or quality checks.
-Metrics/ClassLength:
- Enabled: false
+Style/MethodDefParentheses:
+ Enabled: true
-Metrics/ModuleLength:
- Enabled: false
+Style/MinMax:
+ Enabled: true
-Metrics/MethodLength:
- Enabled: false
+Style/MixinGrouping:
+ Enabled: true
-Metrics/BlockNesting:
- Enabled: false
+Style/MultilineIfThen:
+ Enabled: true
-Metrics/AbcSize:
- Enabled: false
+Style/MultilineMemoization:
+ Enabled: true
-Metrics/CyclomaticComplexity:
- Enabled: false
+Style/MultilineTernaryOperator:
+ Enabled: true
+
+Style/MultipleComparison:
+ Enabled: true
+
+Style/MutableConstant:
+ Enabled: true
+
+Style/NegatedIf:
+ Enabled: true
+
+Style/NegatedWhile:
+ Enabled: true
+
+Style/NestedModifier:
+ Enabled: true
+
+Style/NestedParenthesizedCalls:
+ Enabled: true
+
+Style/NestedTernaryOperator:
+ Enabled: true
+
+Style/Next:
+ Enabled: true
+
+Style/NilComparison:
+ Enabled: true
+
+Style/NonNilCheck:
+ Enabled: true
+
+Style/Not:
+ Enabled: true
+
+Style/NumericLiteralPrefix:
+ Enabled: true
+
+Style/NumericLiterals:
+ Enabled: true
+
+Style/OneLineConditional:
+ Enabled: true
+
+Style/OptionalArguments:
+ Enabled: true
+
+Style/OrAssignment:
+ Enabled: true
+
+Style/ParallelAssignment:
+ Enabled: true
+
+Style/ParenthesesAroundCondition:
+ Enabled: true
+
+Style/PercentLiteralDelimiters:
+ Enabled: true
+
+Style/PercentQLiterals:
+ Enabled: true
+
+Style/PreferredHashMethods:
+ Enabled: true
+
+Style/Proc:
+ Enabled: true
+
+Style/RandomWithOffset:
+ Enabled: true
+
+Style/RedundantBegin:
+ Enabled: true
+
+Style/RedundantConditional:
+ Enabled: true
+
+Style/RedundantException:
+ Enabled: true
+
+Style/RedundantParentheses:
+ Enabled: true
+
+Style/RedundantSelf:
+ Enabled: true
+
+Style/RegexpLiteral:
+ Enabled: true
+
+Style/RescueModifier:
+ Enabled: true
+
+Style/RescueStandardError:
+ Enabled: true
+
+Style/SelfAssignment:
+ Enabled: true
+
+Style/Semicolon:
+ Enabled: true
+
+# We adopted raise instead of fail.
+Style/SignalException:
+ Enabled: true
+ EnforcedStyle: only_raise
+
+Style/SingleLineMethods:
+ Enabled: true
+
+Style/StabbyLambdaParentheses:
+ Enabled: true
+
+Style/StderrPuts:
+ Enabled: true
+
+Style/StringLiterals:
+ Enabled: true
+ EnforcedStyle: double_quotes
+
+Style/StringLiteralsInInterpolation:
+ Enabled: true
+ EnforcedStyle: double_quotes
+
+Style/StructInheritance:
+ Enabled: true
+
+Style/SymbolArray:
+ Enabled: true
+ EnforcedStyle: brackets
+
+Style/SymbolLiteral:
+ Enabled: true
+
+Style/SymbolProc:
+ Enabled: true
+
+Style/TernaryParentheses:
+ Enabled: true
+
+Style/TrailingBodyOnClass:
+ Enabled: true
+
+Style/TrailingBodyOnMethodDefinition:
+ Enabled: true
+
+Style/TrailingBodyOnModule:
+ Enabled: true
+
+# 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/TrailingCommaInArrayLiteral:
+ Enabled: true
+ EnforcedStyleForMultiline: comma
+
+Style/TrailingCommaInHashLiteral:
+ Enabled: true
+ EnforcedStyleForMultiline: comma
-Metrics/ParameterLists:
- Enabled: false
+Style/TrailingMethodEndStatement:
+ Enabled: true
-Metrics/BlockLength:
- Enabled: false
+Style/UnlessElse:
+ Enabled: true
-# It will be obvious which code is complex, Rubocop should only lint simple
-# rules for us.
-Metrics/PerceivedComplexity:
- Enabled: false
+Style/YodaCondition:
+ Enabled: true
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
deleted file mode 100644
index e44c926033..0000000000
--- a/.rubocop_todo.yml
+++ /dev/null
@@ -1,545 +0,0 @@
-# This configuration was generated by
-# `rubocop --auto-gen-config`
-# 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: 290
-# Cop supports --auto-correct.
-Layout/EmptyLineAfterGuardClause:
- Enabled: false
-
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: IndentationWidth.
-# SupportedStyles: special_inside_parentheses, consistent, align_brackets
-Layout/IndentArray:
- EnforcedStyle: consistent
-
-# Offense count: 46
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
-Layout/IndentHeredoc:
- Enabled: false
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# 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: 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'
- - 'lib/bundler/resolver.rb'
- - 'spec/bundler/compact_index_client/updater_spec.rb'
- - 'spec/commands/init_spec.rb'
- - 'spec/commands/install_spec.rb'
- - 'spec/install/gems/flex_spec.rb'
- - 'spec/lock/lockfile_bundler_1_spec.rb'
- - 'spec/lock/lockfile_spec.rb'
- - 'spec/runtime/setup_spec.rb'
- - 'spec/support/helpers.rb'
- - 'spec/support/indexes.rb'
-
-# Offense count: 2
-Lint/EmptyWhen:
- Exclude:
- - 'lib/bundler/friendly_errors.rb'
- - 'spec/support/builders.rb'
-
-# Offense count: 4
-Lint/HandleExceptions:
- Exclude:
- - 'lib/bundler/psyched_yaml.rb'
- - 'lib/bundler/vendored_persistent.rb'
-
-# Offense count: 1
-Lint/IneffectiveAccessModifier:
- Exclude:
- - 'lib/bundler/settings.rb'
-
-# Offense count: 3
-Lint/InterpolationCheck:
- Exclude:
- - 'lib/bundler/dsl.rb'
- - 'lib/bundler/installer/standalone.rb'
- - 'spec/install/gems/standalone_spec.rb'
-
-# Offense count: 1
-# Configuration parameters: MaximumRangeSize.
-Lint/MissingCopEnableDirective:
- Exclude:
- - 'lib/bundler/version.rb'
-
-# Offense count: 3
-Lint/NestedMethodDefinition:
- Exclude:
- - 'lib/bundler/inline.rb'
- - 'spec/support/builders.rb'
-
-# 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: 1
-Lint/UselessAssignment:
- Exclude:
- - 'lib/bundler/index.rb'
-
-# Offense count: 1
-Naming/AccessorMethodName:
- Exclude:
- - 'lib/bundler/source/git.rb'
-
-# Offense count: 33
-# Configuration parameters: Blacklist.
-# 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, MethodDefinitionMacros.
-# NamePrefix: is_, has_, have_
-# NamePrefixBlacklist: is_, has_, have_
-# NameWhitelist: is_a?
-# MethodDefinitionMacros: define_method, define_singleton_method
-Naming/PredicateName:
- Exclude:
- - 'spec/**/*'
- - 'lib/bundler/definition.rb'
- - 'lib/bundler/installer/parallel_installer.rb'
- - 'lib/bundler/settings.rb'
- - 'lib/bundler/source/git.rb'
- - '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: 3
-# Cop supports --auto-correct.
-Performance/InefficientHashSearch:
- Exclude:
- - 'lib/bundler/cli/common.rb'
- - 'lib/bundler/cli/outdated.rb'
- - 'lib/bundler/plugin.rb'
-
-# Offense count: 7
-# Cop supports --auto-correct.
-Performance/RedundantBlockCall:
- Exclude:
- - 'lib/bundler/gem_helper.rb'
- - 'lib/bundler/retry.rb'
- - 'lib/bundler/shared_helpers.rb'
- - 'spec/support/helpers.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Performance/RedundantMatch:
- Exclude:
- - 'lib/bundler/definition.rb'
- - 'lib/bundler/lockfile_parser.rb'
-
-# Offense count: 6
-# Cop supports --auto-correct.
-# Configuration parameters: MaxKeyValuePairs.
-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:
- - 'lib/bundler.rb'
- - 'lib/bundler/endpoint_specification.rb'
- - 'spec/support/streams.rb'
-
-# Offense count: 6
-Security/MarshalLoad:
- Exclude:
- - 'lib/bundler.rb'
- - 'spec/install/gems/resolving_spec.rb'
- - '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: 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, SingleLineConditionsOnly, IncludeTernaryExpressions.
-# SupportedStyles: assign_to_condition, assign_inside_condition
-Style/ConditionalAssignment:
- Exclude:
- - 'lib/bundler/cli.rb'
- - 'lib/bundler/cli/gem.rb'
- - 'lib/bundler/cli/platform.rb'
- - 'lib/bundler/dsl.rb'
- - 'lib/bundler/lazy_specification.rb'
- - 'lib/bundler/psyched_yaml.rb'
- - 'lib/bundler/rubygems_integration.rb'
- - 'lib/bundler/source/git.rb'
- - 'lib/bundler/source/rubygems.rb'
-
-# Offense count: 168
-Style/Documentation:
- Enabled: false
-
-# Offense count: 14
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: compact, expanded
-Style/EmptyMethod:
- Exclude:
- - '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: 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:
- Exclude:
- - 'lib/bundler/settings.rb'
- - 'spec/commands/exec_spec.rb'
-
-# Offense count: 2
-# Configuration parameters: AllowedVariables.
-Style/GlobalVars:
- Exclude:
- - 'lib/bundler/cli.rb'
- - 'spec/spec_helper.rb'
-
-# Offense count: 108
-# Cop supports --auto-correct.
-Style/IfUnlessModifier:
- Enabled: false
-
-# Offense count: 9
-# Cop supports --auto-correct.
-# Configuration parameters: InverseMethods, InverseBlocks.
-Style/InverseMethods:
- Exclude:
- - 'lib/bundler/cli/doctor.rb'
- - 'lib/bundler/definition.rb'
- - 'lib/bundler/dsl.rb'
- - 'lib/bundler/index.rb'
- - '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/MissingRespondToMissing:
- Exclude:
- - 'lib/bundler/dep_proxy.rb'
- - 'lib/bundler/dsl.rb'
- - 'lib/bundler/lazy_specification.rb'
- - 'lib/bundler/plugin/dsl.rb'
- - 'lib/bundler/remote_specification.rb'
- - 'spec/support/builders.rb'
-
-# 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:
- - 'spec/support/path.rb'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-Style/MultilineIfModifier:
- Exclude:
- - 'bin/with_rubygems'
- - 'lib/bundler/installer.rb'
- - 'lib/bundler/psyched_yaml.rb'
- - 'lib/bundler/rubygems_ext.rb'
- - 'lib/bundler/runtime.rb'
- - 'lib/bundler/source/rubygems.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
-# SupportedStyles: predicate, comparison
-Style/NumericPredicate:
- Exclude:
- - 'spec/**/*'
- - '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: compact, exploded
-Style/RaiseArgs:
- Exclude:
- - 'lib/bundler/cli/install.rb'
- - 'lib/bundler/deployment.rb'
- - 'lib/bundler/fetcher/downloader.rb'
- - 'lib/bundler/fetcher/index.rb'
- - 'lib/bundler/installer/standalone.rb'
- - 'lib/bundler/rubygems_integration.rb'
- - 'lib/bundler/shared_helpers.rb'
- - 'lib/bundler/source/git/git_proxy.rb'
- - 'lib/bundler/source/rubygems/remote.rb'
- - 'spec/bundler/endpoint_specification_spec.rb'
- - 'spec/bundler/fetcher/dependency_spec.rb'
- - 'spec/bundler/fetcher/downloader_spec.rb'
- - 'spec/bundler/fetcher/index_spec.rb'
- - 'spec/bundler/rubygems_integration_spec.rb'
- - 'spec/bundler/shared_helpers_spec.rb'
-
-# 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: AllowMultipleReturnValues.
-Style/RedundantReturn:
- Exclude:
- - 'lib/bundler/installer/gem_installer.rb'
-
-# Offense count: 35
-# Cop supports --auto-correct.
-# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
-# Whitelist: present?, blank?, presence, try, try!
-Style/SafeNavigation:
- Enabled: false
-
-# Offense count: 57
-# Cop supports --auto-correct.
-# Configuration parameters: MinSize.
-# SupportedStyles: percent, brackets
-Style/SymbolArray:
- EnforcedStyle: brackets
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Style/UnneededCondition:
- Exclude:
- - 'lib/bundler/gem_helper.rb'
-
-# Offense count: 14
-# Cop supports --auto-correct.
-Style/UnneededInterpolation:
- Exclude:
- - 'lib/bundler/cli/config.rb'
- - 'lib/bundler/env.rb'
- - '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