diff options
-rw-r--r-- | .rubocop_todo.yml | 117 | ||||
-rw-r--r-- | Rakefile | 8 | ||||
-rwxr-xr-x | bin/rubocop | 2 |
3 files changed, 105 insertions, 22 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f0419ed089..8abe1e76eb 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,17 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-07-27 12:41:39 -0500 using RuboCop version 0.41.2. +# on 2016-11-19 11:43:45 -0600 using RuboCop version 0.45.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 +Lint/EmptyWhen: + Exclude: + - 'lib/bundler/friendly_errors.rb' + - 'spec/support/builders.rb' + # Offense count: 4 Lint/Eval: Exclude: @@ -41,6 +47,7 @@ Lint/RescueException: - 'lib/bundler/worker.rb' # Offense count: 1 +# Configuration parameters: ContextCreatingMethods. Lint/UselessAccessModifier: Exclude: - 'lib/bundler/fetcher.rb' @@ -51,17 +58,17 @@ Lint/UselessAssignment: - 'lib/bundler/index.rb' - 'lib/bundler/installer.rb' -# Offense count: 1686 -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes. +# Offense count: 7 +# Configuration parameters: CountComments. +Metrics/BlockLength: + Max: 46 + +# Offense count: 1855 +# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives. # URISchemes: http, https Metrics/LineLength: Max: 207 -# Offense count: 3 -# Configuration parameters: CountKeywordArgs. -Metrics/ParameterLists: - Max: 6 - # Offense count: 6 # Cop supports --auto-correct. Performance/RedundantBlockCall: @@ -79,20 +86,19 @@ Performance/RedundantMatch: - 'lib/bundler/definition.rb' - 'lib/bundler/lockfile_parser.rb' -# Offense count: 6 +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: MaxKeyValuePairs. Performance/RedundantMerge: Exclude: - 'lib/bundler/cli/gem.rb' - - 'spec/support/helpers.rb' # Offense count: 1 Style/AccessorMethodName: Exclude: - 'lib/bundler/source/git.rb' -# Offense count: 3 +# Offense count: 4 Style/CaseEquality: Exclude: - 'lib/bundler/dsl.rb' @@ -105,7 +111,7 @@ Style/CaseEquality: Style/ClassAndModuleChildren: Enabled: false -# Offense count: 10 +# Offense count: 9 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly. # SupportedStyles: assign_to_condition, assign_inside_condition @@ -113,7 +119,6 @@ Style/ConditionalAssignment: Exclude: - 'lib/bundler/cli.rb' - 'lib/bundler/cli/gem.rb' - - 'lib/bundler/cli/lock.rb' - 'lib/bundler/cli/platform.rb' - 'lib/bundler/dsl.rb' - 'lib/bundler/lazy_specification.rb' @@ -122,7 +127,7 @@ Style/ConditionalAssignment: - 'lib/bundler/source/git.rb' - 'lib/bundler/source/rubygems.rb' -# Offense count: 138 +# Offense count: 148 Style/Documentation: Enabled: false @@ -133,13 +138,32 @@ Style/ExtraSpacing: Exclude: - 'lib/bundler/cli.rb' -# Offense count: 4 +# Offense count: 2 # Configuration parameters: AllowedVariables. Style/GlobalVars: Exclude: - 'lib/bundler/cli.rb' - 'spec/spec_helper.rb' - - 'spec/support/helpers.rb' + +# Offense count: 19 +# Configuration parameters: MinBodyLength. +Style/GuardClause: + Exclude: + - 'lib/bundler/cli/cache.rb' + - 'lib/bundler/cli/clean.rb' + - 'lib/bundler/cli/install.rb' + - 'lib/bundler/cli/outdated.rb' + - 'lib/bundler/cli/package.rb' + - 'lib/bundler/definition.rb' + - 'lib/bundler/dsl.rb' + - 'lib/bundler/installer.rb' + - 'lib/bundler/lockfile_parser.rb' + - 'lib/bundler/runtime.rb' + - 'lib/bundler/shared_helpers.rb' + - 'lib/bundler/source/path/installer.rb' + - 'lib/bundler/source_list.rb' + - 'spec/commands/newgem_spec.rb' + - 'spec/support/sometimes.rb' # Offense count: 1 Style/IfInsideElse: @@ -151,13 +175,23 @@ Style/IfUnlessModifierOfIfUnless: Exclude: - 'spec/support/helpers.rb' -# Offense count: 4 +# Offense count: 10 # Cop supports --auto-correct. # Configuration parameters: SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets Style/IndentArray: EnforcedStyle: consistent +# Offense count: 6 +Style/MethodMissing: + 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: 2 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: module_function, extend_self @@ -166,6 +200,17 @@ Style/ModuleFunction: - 'lib/bundler/shared_helpers.rb' - 'spec/support/path.rb' +# Offense count: 11 +# 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: EnforcedStyle, SupportedStyles, IndentationWidth. @@ -183,6 +228,18 @@ Style/NestedParenthesizedCalls: - 'spec/commands/lock_spec.rb' - 'spec/runtime/setup_spec.rb' +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles. +# SupportedStyles: predicate, comparison +Style/NumericPredicate: + Exclude: + - 'spec/**/*' + - 'lib/bundler/gem_helper.rb' + - 'lib/bundler/mirror.rb' + - 'lib/bundler/source/git/git_proxy.rb' + - 'lib/bundler/source/path.rb' + # Offense count: 9 # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. # NamePrefix: is_, has_, have_ @@ -219,6 +276,23 @@ Style/SpaceAroundOperators: Exclude: - 'lib/bundler/retry.rb' +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. +# SupportedStyles: space, no_space +Style/SpaceInsideBlockBraces: + Exclude: + - 'lib/bundler/installer/parallel_installer.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment. +# SupportedStyles: require_parentheses, require_no_parentheses +Style/TernaryParentheses: + Exclude: + - 'lib/bundler/cli/common.rb' + - 'lib/bundler/gem_version_promoter.rb' + # Offense count: 10 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. @@ -245,3 +319,12 @@ Style/UnneededInterpolation: - 'spec/commands/exec_spec.rb' - 'spec/support/artifice/endpoint.rb' - 'spec/support/artifice/endpoint_500.rb' + +# Offense count: 2 +# Configuration parameters: SupportedStyles. +# SupportedStyles: snake_case, normalcase, non_integer +Style/VariableNumber: + EnforcedStyle: normalcase + Exclude: + - 'spec/commands/help_spec.rb' + - 'spec/other/ext_spec.rb' @@ -39,7 +39,7 @@ namespace :spec do deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d| [d.name, d.requirement.to_s] end] - deps["rubocop"] ||= "= 0.41.2" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement + deps["rubocop"] ||= "= 0.45.0" if RUBY_VERSION >= "2.0.0" # can't go in the gemspec because of the ruby version requirement # JRuby can't build ronn or rdiscount, so we skip that if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" @@ -91,9 +91,9 @@ begin RSpec::Core::RakeTask.new task :spec => "man:build" - if RUBY_VERSION >= "1.9.3" + if RUBY_VERSION >= "2.0.0" # can't go in the gemspec because of the ruby version requirement - gem "rubocop", "= 0.41.2" + gem "rubocop", "= 0.45.0" require "rubocop/rake_task" RuboCop::RakeTask.new end @@ -190,7 +190,7 @@ begin task :travis do rg = ENV["RGV"] || raise("Rubygems version is required on Travis!") - if RUBY_VERSION > "1.9.3" + if RUBY_VERSION >= "2.0.0" puts "\n\e[1;33m[Travis CI] Running bundler linter\e[m\n\n" Rake::Task["rubocop"].invoke end diff --git a/bin/rubocop b/bin/rubocop index 78641c589f..83e8e78c08 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.41.2" +gem "rubocop", "= 0.45.0" Gem.finish_resolve if Gem.respond_to?(:finish_resolve) |