From 33af546654095a0d19970a5ce5348805ee5c438f Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 10 Nov 2014 14:40:13 -0500 Subject: [PATCH] Upgraded RuboCop to 0.27.0, rewritten yml via a todo yml. --- .rubocop.yml | 35 ++------------------------- .rubocop_todo.yml | 55 +++++++++++++++++++++++++++++++++++++++++++ grape-swagger.gemspec | 2 +- 3 files changed, 58 insertions(+), 34 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 6fab46e9..04b22169 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,36 +1,5 @@ AllCops: - Excludes: + Exclude: - vendor/**/* -LineLength: - Enabled: false - -MethodLength: - Enabled: false - -ClassLength: - Enabled: false - -Documentation: - # don't require classes to be documented - Enabled: false - -Encoding: - # no need to always specify encoding - Enabled: false - -FileName: - # allow grape-swagger.rb - Enabled: false - -PredicateName: - Enabled: false - -DoubleNegation: - Enabled: false - -CyclomaticComplexity: - Enabled: false - -ClassVars: - Enabled: false +inherit_from: .rubocop_todo.yml diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..0a908575 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,55 @@ +# This configuration was generated by `rubocop --auto-gen-config` +# on 2014-11-10 14:38:32 -0500 using RuboCop version 0.27.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: 8 +Metrics/AbcSize: + Max: 332 + +# Offense count: 1 +# Configuration parameters: CountComments. +Metrics/ClassLength: + Max: 385 + +# Offense count: 4 +Metrics/CyclomaticComplexity: + Max: 92 + +# Offense count: 209 +# Configuration parameters: AllowURI, URISchemes. +Metrics/LineLength: + Max: 254 + +# Offense count: 11 +# Configuration parameters: CountComments. +Metrics/MethodLength: + Max: 354 + +# Offense count: 4 +Metrics/PerceivedComplexity: + Max: 98 + +# Offense count: 7 +Style/ClassVars: + Enabled: false + +# Offense count: 62 +Style/Documentation: + Enabled: false + +# Offense count: 2 +Style/DoubleNegation: + Enabled: false + +# Offense count: 3 +# Configuration parameters: Exclude. +Style/FileName: + Enabled: false + +# Offense count: 1 +# Configuration parameters: NamePrefix, NamePrefixBlacklist. +Style/PredicateName: + Enabled: false diff --git a/grape-swagger.gemspec b/grape-swagger.gemspec index 73f771e4..a3b7ff99 100644 --- a/grape-swagger.gemspec +++ b/grape-swagger.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'bundler' s.add_development_dependency 'rack-test' s.add_development_dependency 'rack-cors' - s.add_development_dependency 'rubocop', '0.24.1' + s.add_development_dependency 'rubocop', '0.27.0' s.add_development_dependency 'kramdown', '~> 1.4.1' s.add_development_dependency 'redcarpet', '~> 3.1.2' unless RUBY_PLATFORM.eql? 'java' s.add_development_dependency 'rouge', '~> 1.6.1'