From 52830de1fbd67374602868d76b21510bdcf7bdc4 Mon Sep 17 00:00:00 2001 From: stve Date: Mon, 9 Feb 2015 00:42:52 -0500 Subject: [PATCH] run rubocop as part of default CI tests --- .rubocop.yml | 33 +++++++++++++++++++++++++++++++++ Rakefile | 8 +++++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..6fe7ec2 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,33 @@ +Metrics/BlockNesting: + Max: 2 + +Metrics/LineLength: + AllowURI: true + Enabled: false + +Metrics/MethodLength: + CountComments: false + Max: 10 + +Metrics/ParameterLists: + Max: 4 + CountKeywordArgs: true + +Style/CollectionMethods: + PreferredMethods: + map: 'collect' + reduce: 'inject' + find: 'detect' + find_all: 'select' + +Style/Documentation: + Enabled: false + +Style/DoubleNegation: + Enabled: false + +Style/SpaceInsideHashLiteralBraces: + EnforcedStyle: no_space + +Style/TrailingComma: + EnforcedStyleForMultiline: 'comma' diff --git a/Rakefile b/Rakefile index d00ec43..7181c27 100755 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -#!/usr/bin/env rake - require 'bundler' Bundler::GemHelper.install_tasks @@ -7,7 +5,11 @@ require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) task test: :spec -task default: :spec + +require 'rubocop/rake_task' +RuboCop::RakeTask.new require 'yard' YARD::Rake::YardocTask.new + +task default: [:spec, :rubocop]