run rubocop as part of default CI tests

This commit is contained in:
stve 2015-02-09 00:42:52 -05:00
parent 29e49c1ed7
commit 52830de1fb
2 changed files with 38 additions and 3 deletions

33
.rubocop.yml Normal file
View file

@ -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'

View file

@ -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]